Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

disable crossorigin warning for Text Tracks #3

Open
nathanallen opened this issue Feb 9, 2019 · 0 comments
Open

disable crossorigin warning for Text Tracks #3

nathanallen opened this issue Feb 9, 2019 · 0 comments

Comments

@nathanallen
Copy link

nathanallen commented Feb 9, 2019

Follow up from https://www.pivotaltracker.com/story/show/163793852 and https://github.com/doximity/doximity/pull/28129

An annoying warning message is displayed in the console when loading cross origin video (possibly safari-only):

src/js/tech/html5.js # crossoriginTracks
88:      log.warn(tsml`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.

However, (re)enabling the crossorigin attribute on video elements leads to CORS errors when loading 3rd party video (video from a different origin / domain than doximity.com).

Example errors:

Text on video element:

"The media could not be loaded, either because the server or network failed or because the format is not supported."

CORS error in console:

Access to video at 'https://video.dailymail.co.uk/video/mol/2018/11/21/8775088728688772301/1024x576_MP4_8775088728688772301.mp4' from origin 'https://www.doximity.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource

Solution

Given the warning message is not an error, and we do need to support loading cross origin video, we should suppress the warning message.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant