Bug 103257
Summary: | crossOrigin property on HTMLMediaElement is not supported | ||
---|---|---|---|
Product: | WebKit | Reporter: | Antoine Quint <graouts> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, electroteque, eric.carlson, graouts, syoichi, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://w3c-test.org/html/tests/submission/Opera/media/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=103926 |
Antoine Quint
It appears the crossOrigin property of HTMLMediaElement is not support at all. This makes the Opera-submitted test at http://w3c-test.org/html/tests/submission/Opera/media/interfaces/HTMLElement/HTMLMediaElement/crossOrigin.html fail.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Antoine Quint
<rdar://problem/12756199>
Alexey Proskuryakov
*** Bug 151294 has been marked as a duplicate of this bug. ***
Daniel Rossi
Let me bring example code over to here with one exception. IOS didn't like the extra arguments to drawImage and produces a blank canvas !
this.canvas = document.createElement("canvas");
this.canvas.setAttribute("width", width);
this.canvas.setAttribute("height", height);
var ctx = this.canvas.getContext('2d');
ctx.drawImage(video,0, 0, width, height);
var dataURL = this.canvas.toDataURL("image/" + this.type, this.quality);
Without the proxy work around this will fail because lack of crossorigin attribute. The default android browser suffers the same issue however it also fails with the security work around !
Here is a working example for safari IOS and IE11 with the proxy work around, it makes a capture from an offscreen video tag with the reformatted url of the same sub domain, it will fail even with the same top level domain.
https://flowplayer.electroteque.org/snapshot/fp6
Daniel Rossi
An example of the nginx proxy in action,
flowplayer.electroteque.org/video/big_buck_bunny_480p_h264.mp4
it does an nginx reverse proxy to
videos.electroteque.org/big_buck_bunny_480p_h264.mp4
Ahmad Saleem
I think it is now supported because I can see "crossOrigin" in HTMLMediaElement source file on Webkit Github mirror.
Link - https://github.com/WebKit/WebKit/blob/cd3c4119cce0c4edca2a0b03a338e61f8ae03960/Source/WebCore/html/HTMLMediaElement.cpp
If someone else need to be done, please update or open separate bugs. Also I am unable to retrieve above Opera submitted result. I tried to look into WPT.FYI but didn't find this test as well (might have been renamed). Thanks!
Alexey Proskuryakov
Thank you for checking!
*** This bug has been marked as a duplicate of bug 159459 ***