-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Can't handle text streams with different mimeTypes #571
Comments
This is reproducible in the shaka demo app using this content: It's protected so just plug in a dummy url for license url. This will get your far enough to reproduce the issue. To trigger this issue you can side load any vtt track
|
I haven't debugged at all, but I believe this is a bug. It's caused by the fact that StreamingEngine treats text the same as any other track type. For audio and video, it is not legal to change containers or codecs. MediaSource would have to be torn down for that, and in order to maintain seamless playback, we never tear down MediaSource within one presentation. Text, on the other hand, is not handled by MediaSource in our player. So we could change text parsers on-the-fly when changing text tracks. StreamingEngine treats it like audio or video, though, and feeds the side-loaded text track to the text parser it already initialized. We'll try to address this in v2.1, but side-loaded text is a low priority right now, so it might slip. |
I think that it's not working on master branch. I tested with mpd with stpp subtitles and external track webvtt. With:
I can not see the subtitles and in the console I see "{category: 2, code: 2004, data: Array[0]} TEXT --> BAD_ENCODING 2004" and adding a timeout:
I can see the subtitles but in console I see: "Uncaught (in promise) r {category: 3, code: 3015, data: Array[1]}" |
Error 3015 is |
Reproducible using Shaka v2.0.0-debug. (Commit #6f47acf688 currently 1 commit behind)
(1) Load content that contains MP4 embedded TTML
<AdaptationSet group="3" contentType="text" lang="en" minBandwidth="1000" maxBandwidth="1000" mimeType="application/mp4" codecs="stpp">
(2) Side load a web/vtt text track:
shakaPlayer.addTextTrack(trackUrl, 'eng', 'caption', 'text/vtt');
Expected:
Two text tracks should be available.
Result:
Bad Encoding (2004) error.
It appears that when the vtt track is not loaded then then the text track listed in the manifest is parsed using the
Mp4TtmlParser
and there are no errors. However when the the vtt track is sideloaded then a new parser is set in theTextEngine
(line 38). When it comes time then to parse the TTML track, theTextEngine
attempts to parse the track using theVttTextParser
and it fails.I'm not sure I can distribute the content that I used to reproduce this but I'll try to provide some content ASAP.
The text was updated successfully, but these errors were encountered: