Bug 103257 - crossOrigin property on HTMLMediaElement is not supported
Summary: crossOrigin property on HTMLMediaElement is not supported
Status: RESOLVED DUPLICATE of bug 159459
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://w3c-test.org/html/tests/submis...
Keywords: InRadar
: 151294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-26 08:09 PST by Antoine Quint
Modified: 2022-06-03 11:38 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2012-11-26 08:09:38 PST
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.
Comment 1 Antoine Quint 2012-11-27 01:52:42 PST
<rdar://problem/12756199>
Comment 2 Alexey Proskuryakov 2015-11-15 13:09:35 PST
*** Bug 151294 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Rossi 2015-11-15 23:08:27 PST
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
Comment 4 Daniel Rossi 2015-11-15 23:10:19 PST
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
Comment 5 Ahmad Saleem 2022-06-02 22:15:20 PDT
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!
Comment 6 Alexey Proskuryakov 2022-06-03 11:36:57 PDT
Thank you for checking!

*** This bug has been marked as a duplicate of bug 159459 ***