crossOrigin parameter for Video
See original GitHub issueBaseTexture.fromImage allows supplying a crossOrigin setting or defaulting to anonymous via determineCrossOrigin.
VideoBaseTexture (or Texture.fromVideo, etc.) needs a similar mechanism. Otherwise Safari (and possibly others) will block loading the video texture from a remote source.
This is not necessarily a showstopper for current production code, considering that a Video Element can be created first with the proper crossOrigin policy and then supplied, like so:
var videoElement = document.createElement('video') as HTMLVideoElement;
videoElement.crossOrigin = "anonymous";
videoElement.autoplay = true;
videoElement.src = "http://cdn.example.com/video.mp4";
var texture: PIXI.Texture = PIXI.Texture.fromVideo(videoElement);
var videoSprite = new PIXI.Sprite(texture);
SomeContainer.addChild(videoSprite);
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
HTML attribute: crossorigin - MDN Web Docs
The crossorigin content attribute on media elements is a CORS settings attribute. These attributes are enumerated, and have the following ...
Read more >HTML <video> crossorigin Attribute
The HTML crossorigin attribute is used in the <video> element that supports a CORS request when we tried to fetch out the video...
Read more >cross-origin video in Safari - html
Does anyone know if Safari supports crossorigin attribute on the HTML5 <video> tag? I serve video from a server that responds with all...
Read more >HTML script crossorigin Attribute
The crossorigin attribute sets the mode of the request to an HTTP CORS Request. Web pages often make requests to load resources on...
Read more >Cross-origin data in HTML5 Canvas
For cross-origin data in canvas, add the following attribute to the <audio? or <video> element − <img src="..." crossorigin="Anonymous" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it works! @dakom thanks
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.