<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>151294</bug_id>
          
          <creation_ts>2015-11-14 21:28:37 -0800</creation_ts>
          <short_desc>HtmlMediaElement missing &quot;crossOrigin&quot; attribute therefore CORS does not work</short_desc>
          <delta_ts>2015-11-16 05:11:06 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>103257</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Rossi">electroteque</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1142094</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2015-11-14 21:28:37 -0800</bug_when>
    <thetext>Hi I&apos;m not sure if anyone has mentioned this but this standard has been around for a long time now. 

This is not implemented therefore this type of code will not work

this.canvas = document.createElement(&quot;canvas&quot;);
    this.canvas.setAttribute(&quot;width&quot;, width);
    this.canvas.setAttribute(&quot;height&quot;, height);
var ctx = this.canvas.getContext(&apos;2d&apos;);
 ctx.drawImage(video,0, 0, width, height, x, y, width, height);
var dataURL = this.canvas.toDataURL(&quot;image/&quot; + this.type, this.quality);

Both Safari in OSX and IOS, Android default browser and IE11 suffer the same issue. 

It requires a proxy work around setting up a new video for capture or requires Flash to do the capture !   to think it needs a work around like this is silly considering Apple&apos;s stance against Flash but then requiring Flash to do captures of video frames. 

It is a fairly common requirement and the deviation from standards is troubling. 

I believe there is a ticket in regards to the 360 webGL CORS which is quickly becoming popular and will be needed. But this is not just drawing to the canvas but &quot;toDataUR&quot; to get the image data uri also. 

Let me know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1142096</commentid>
    <comment_count>1</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2015-11-14 21:31:15 -0800</bug_when>
    <thetext>The video object is 

&lt;video crossOirign=&quot;anonymous&quot; src=&quot;source.mp4&quot;/&gt; 

btw</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1142111</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2015-11-15 00:14:58 -0800</bug_when>
    <thetext>drawImage for video is reported to be intentionally disabled on IOS so this only applies to desktop Safari. 

I just checked, even with the proxy work around, its a blank image, nothing gets drawn. 

What a croc html5 has become. So basically this feature so far doesn&apos;t even work on IOS or Android.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1142129</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2015-11-15 13:09:35 -0800</bug_when>
    <thetext>Duping this to an earlier bug about HTMLMediaElemant and crossOrigin, although I&apos;m not sure what you mean by &quot;capture&quot;. HTML Media Capture &lt;http://www.w3.org/TR/html-media-capture/&gt; doesn&apos;t look like this.

*** This bug has been marked as a duplicate of bug 103257 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1142164</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2015-11-15 23:05:18 -0800</bug_when>
    <thetext>Sorry mate I didn&apos;t see that I would have assumed there is something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1142224</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2015-11-16 05:11:06 -0800</bug_when>
    <thetext>The requirement is pretty redundant on Iphone for now because I can&apos;t even get any html controls over the native player and it has no inline support. So no capture button is possible for end users. I&apos;m trying to figure out a work around solution.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>