-
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
Error adding external ttml captions file after load. #821
Comments
Regarding our captions in reverse order. A snippet of a specific ttml segment. The first |
Hi @ewosleger,
Regarding the first one (captions in reverse order), could you tell me if the 'tts:writingMode' attribute is present on the segment and what it's value is if yes. |
Yes, one issue lead to another. We are experiencing the reverse stacking of the captions. Looking for a quick solution we have an addition ttml files that is not bundled with the manifest the we wanted to load in addition to the embedded ttml files. In the player.load i added the snippet: this.player.addTextTrack(parent.params.dash_ttml, 'eng','caption', 'text/ttml'); }).catch(_globalSelf.onError);` Assuming that is the correct addTextTrack syntax, I was thrown the following error: |
Have you tried with the latest shakaDemo.localPlayer_.addTextTrack('yourUrl', 'eng', 'caption', 'text/ttml'); Are all the captions the same type? If the external captions are TTML and the manifest ones are VTT or TTML in MP4, then we will error out in that version. We don't support switching between text track formats until v2.1. Also, the code you posted may not work because you don't use player.load(...).then(function() {
...
}.bind(this)); As for the out of order lines, this is partially a browser problem. We just take the cues and create |
@ewosleger I might be able to help with the ordering if you could tell me if the 'tts:writingMode' attribute is present on the segment and what it's value is if yes. |
We do not have the attribute "tts:writingMode" in our ttml. |
I believe out latest build version is Shake v 2.0.8 - I will update and test latest stable build. |
I verified that we are parsing the "tts:origin" attribute and constructing the VttCues correctly, so it might be a bug on the browser's side as @TheModMaker mentioned. |
Let's split the caption ordering into a separate bug report. Here we will deal with the more severe issue of an API failing in compiled mode. |
Even in uncompiled mode, the error is easily reproducible on the nightly and in v2.1.2:
It does not reproduce in v2.0.9. |
We broke this in 6b6bfb7 |
Let's unpack several issues mentioned here. Exception in addTextTrackThe exception you get ("tb[b]" etc), is caused by you passing the wrong MIME type. "text/ttml" is not the official MIME type of TTML, so our parser is not selected. Please use "application/ttml+xml" instead. Display order for overlapping cuesWe don't control this directly. Cues are displayed by the browser. I've split this into #848. Exception in demo appThere is an exception in the demo app UI that prevents the UI from being updated correctly with the list of tracks. This is caused by an unexpected situation in which text tracks exist, but none are marked as "active" tracks when we hit I thought this was the same error as the If we fix this exception in the demo, the UI is populated correctly and the text tracks can be manually selected, but none is selected for us by the player. So this doesn't really fix the root of the problem, which is that the Player fails to select the newly-added tracks. This regression started in 6b6bfb7. |
There was a bug where manually added text tracks weren't added to the active track list in Player. This caused assertion failures and problems with selecting those tracks. Now those tracks will be tracked correctly. Note that Player will correctly select text tracks based on language and will allow switching. Closes #821 Change-Id: Ie9465a2d3bc757f43281ef40658daa488f58bc12
Shaka v2.0.8
We noticed Shaka is displaying our captions in reverse order from our embedded ttml files in the manifest:
"jumped over the fence"
"Quick brown fox"
We have external caption files also so I am trying to addTextTrack() to the player:
player.load(_globalSelf.manifest).then(function() {
parent.messageService.dispatch(ShoMediaNotifications.PLAYER_READY, null);
if(typeof parent.params.dash_ttml !== 'undefined'){
}).catch(_globalSelf.onError);
player errors out: tb[b] is not a constructor.
The text was updated successfully, but these errors were encountered: