phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
http://phaser.io
MIT License
1.34k stars 491 forks source link

crossorigin attribute on video #676

Closed jorginius closed 4 years ago

jorginius commented 4 years ago

This PR (choose one or more, ✏️ delete others)

Please include a summary in Change Log: Unreleased and thank yourself.

Describe the changes below:

Some storage services (i.e. S3) won't send CORS headers if the CORS attribute is not included in the request. The browser will refuse to load the video (createVideoFromURL) from S3.

https://docs.aws.amazon.com/AmazonS3/latest/dev/cors-troubleshooting.html (2.a)

"If the header is missing, Amazon S3 doesn't treat the request as a cross-origin request, and doesn't send CORS response headers in the response."

More info:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video#attr-crossorigin