Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add crossorigin documentation and explanation and update examples #1888

Closed
4 tasks done
gkatsev opened this issue Feb 23, 2015 · 3 comments
Closed
4 tasks done

Add crossorigin documentation and explanation and update examples #1888

gkatsev opened this issue Feb 23, 2015 · 3 comments
Assignees
Milestone

Comments

@gkatsev
Copy link
Member

gkatsev commented Feb 23, 2015

At least on iOS, we cannot use native text tracks with cross-domain tracks without applying the crossorigin="anonymous" property to the video element. We should apply that where appropriate.
Different browser react differently to that attribute, so, we definitely don't want to apply it by default. We want to apply it to a targeted range of browsers.

The takeaway from #2269:

  • We need to document the crossorigin property that when tracks are crossorigin and require CORS the video file itself will also require CORS (at least, as far as we understand it)
  • Document that users will need to be in charge of adding or removing the crossorigin attribute on the video element
  • We should print a warning in the console when we detect that captions wouldn't be loaded because of CORS
  • Update the sandbox example and the website to correctly use the crossorigin attribute
@gkatsev
Copy link
Member Author

gkatsev commented Mar 9, 2015

More info: This is because native text tracks with VTT files on other origins require crossorigin="anonymous" on the video element to work but in some browsers if the crossorigin attribute is set but the video (mp4 in chrome, for example) doesn't have CORS headers set up as well then the video will fail.

@gkatsev gkatsev mentioned this issue Jun 16, 2015
2 tasks
@gkatsev gkatsev self-assigned this Jun 16, 2015
@gkatsev gkatsev changed the title Captions: add crossorigin=anonymous when using native tracks, if appropriate Add crossorigin documentation and explanation and update examples Jul 15, 2015
@hparra
Copy link

hparra commented Sep 22, 2015

👍 I get the following error in Chrome Version 44.0.2403.157 (64-bit). No differences with crossorigin="anonymous". Problem is known CORS issue, but error unclear. Is the errorHandler not forwarding the exact error message?

VIDEOJS: ERROR: Error
    at errorHandler (http://localhost:8000/node_modules/video.js/dist/video-js/video.dev.js:1606:13)
    at XMLHttpRequest.request.onreadystatechange (http://localhost:8000/node_modules/video.js/dist/video-js/video.dev.js:1659:11)_logType @ video.dev.js:1457vjs.log.error @ video.dev.js:1481(anonymous function) @ video.dev.js:8604ret @ video.dev.js:885errorHandler @ video.dev.js:1609request.onreadystatechange @ video.dev.js:1659

@ndubbaka
Copy link

ndubbaka commented Nov 4, 2015

I get this error on video "The video could not be loaded, either because the server or network failed or because the format is not supported."
image

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants