-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Log and ignore non-standard WebVTT settings #509
Comments
The error you're getting is a mixed content error. Here's a repro: Note that the player is HTTPS, but the manifest is HTTP. Here's a link to learn more about mixed content, and why browsers don't let you do it: https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content If I load both player and manifest over plain HTTP, I see the error INVALID_TEXT_SETTINGS: This appears to be caused by your VTT captions, specifically this line: The abbreviation of "align" to "A" and "size" to "S" is out of spec. See https://w3c.github.io/webvtt/#cue-settings for correct formatting. |
Thanks Joey! Sorry I didn't notice the mixed content issue. For the VTT issue I'm curious if the exception comes from the video tag or text tracks and if it breaks playback. In general all errors we catch or handle from shaka stop playback. If there are any we could just log without interrupting playback we'd want to keep track of these. |
Most browsers only support WebVTT natively, while a few others only support TTML natively. We parse cues ourselves and feed them to the browser's TextTrack. That way, we can support the same set of text formats (WebVTT and TTML, in text or in MP4) regardless of what the browser supports natively. The INVALID_TEXT_SETTINGS exception is thrown by the VTT parser in Shaka Player. shaka.media.VttTextParser.parseSetting fails to parse the settings, returns false, and shaka.media.VttTextParser.parseCue_ throws the exception. |
OK. Sounds valid. We do the same in jwplayer when side loading VTT tracks to avoid CORs issues (video src origin is not always the same as the text track scr). I think our handling of cue parsing a little more lenient. @egreaves correct me I'm wrong - If we can't parse positioning info we ignore it. @joeyparrish I'm not sure if this track would break video playback but if this is the intended behavior then I'm happy to close this issue. |
We could always log a warning and ignore bad settings instead of emitting an error. Would that be helpful? |
Ping! @robwalch, would it be helpful to log and ignore when we encounter bad settings? Or are we okay with dispatching an error? |
It would be helpful to log and ignore.
|
Okay, can do. |
@robwalch Done! No errors anymore. Let us know if you have any questions. |
Closes #509 Change-Id: I1aced2ea8828c4ca6a9afee6ea28b0144a832029
2.0.0-beta3
master
?Not sure
Yes
Attempt to play a stream
http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd
Stream plays. Is still plays in v1.6
Error:
Shaka Error NETWORK.HTTP_ERROR (http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd)
The text was updated successfully, but these errors were encountered: