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

Log and ignore non-standard WebVTT settings #509

Closed
robwalch opened this issue Sep 7, 2016 · 9 comments
Closed

Log and ignore non-standard WebVTT settings #509

robwalch opened this issue Sep 7, 2016 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@robwalch
Copy link

robwalch commented Sep 7, 2016

  • What version of Shaka Player are you using?
    • Can you reproduce the issue with our latest release version?
      2.0.0-beta3
    • Can you reproduce the issue with the latest code from master?
      Not sure
  • Are you using the demo app or your own custom app?
    • If custom app, can you reproduce the issue using our demo app?
      Yes
  • What did you do?
    Attempt to play a stream
var player = new shaka.Player(video);
player.configure({
  manifest: {
    dash: {
      customScheme: function() {return null;}
    }
  },
  drm: {}
});
player.load(url).then(noop, handleError);
  • What did you expect to happen?
    Stream plays. Is still plays in v1.6
  • What actually happened?
    Error: Shaka Error NETWORK.HTTP_ERROR (http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd)
@joeyparrish joeyparrish self-assigned this Sep 7, 2016
@joeyparrish joeyparrish added the status: working as intended The behavior is intended; this is not a bug label Sep 7, 2016
@joeyparrish joeyparrish changed the title Stream used to play in v1.6 no longer plays in v2 WebVTT fails to parse (content out of spec) + mixed content errors Sep 7, 2016
@joeyparrish
Copy link
Member

The error you're getting is a mixed content error. Here's a repro:

https://shaka-player-demo.appspot.com/demo/?play;asset=http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd

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:

http://shaka-player-demo.appspot.com/demo/?play;asset=http://dash.edgesuite.net/akamai/test/caption_test/ElephantsDream/elephants_dream_480p_heaac5_1.mpd

This appears to be caused by your VTT captions, specifically this line:
00:01:16.042 --> 00:01:18.083 A:start S:25%

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.

@robwalch
Copy link
Author

robwalch commented Sep 9, 2016

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.

@joeyparrish
Copy link
Member

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.

@robwalch
Copy link
Author

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.

@joeyparrish
Copy link
Member

We could always log a warning and ignore bad settings instead of emitting an error. Would that be helpful?

@joeyparrish
Copy link
Member

Ping! @robwalch, would it be helpful to log and ignore when we encounter bad settings? Or are we okay with dispatching an error?

@robwalch
Copy link
Author

robwalch commented Oct 4, 2016

It would be helpful to log and ignore.

On Oct 3, 2016, at 7:19 PM, Joey Parrish notifications@github.com wrote:

Ping! @robwalch, would it be helpful to log and ignore when we encounter bad settings? Or are we okay with dispatching an error?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@joeyparrish joeyparrish added type: enhancement New feature or request and removed status: working as intended The behavior is intended; this is not a bug labels Oct 4, 2016
@joeyparrish
Copy link
Member

Okay, can do.

@joeyparrish joeyparrish changed the title WebVTT fails to parse (content out of spec) + mixed content errors Log and ignore non-standard WebVTT settings Oct 4, 2016
@joeyparrish joeyparrish removed their assignment Oct 4, 2016
@joeyparrish joeyparrish modified the milestone: v2.1.0 Oct 4, 2016
@ismena ismena self-assigned this Oct 5, 2016
@ismena
Copy link
Contributor

ismena commented Oct 5, 2016

@robwalch Done! No errors anymore.

Let us know if you have any questions.

joeyparrish pushed a commit that referenced this issue Oct 19, 2016
Closes #509

Change-Id: I1aced2ea8828c4ca6a9afee6ea28b0144a832029
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants