-
Notifications
You must be signed in to change notification settings - Fork 422
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
Dash captions cannot handle duplicate "lang" and ignores label #645
Comments
👋 Thanks for opening your first issue here! 👋 If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Just a sidenote: I thought that this might be a trivial usage of a Set in the parser and a missing getter for the label, but I have no idea where to actually find the parsing code to begin the investigation. |
Interesting, it's possible that we deduping based on kind and language. Looking at the HTML spec now, it seems that label is also used for deduping, though, I thought that labels didn't count previously. |
I reproduced the same problem with audio languages. Same example as above. Or maybe you have a suggestion where to start when I want to investigate this myself. |
Yeah, could be related to that piece. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still very important |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@gkatsev Is there actually a need to dedupe the data at all? |
Is there any change for looking into this? Especially the |
I found the language and text track selection to be rather unusable for our files. function filterTextTracks({ language }: shaka.extern.Track) {
return language !== 'und' && language.length > 0 // HLS bug, this is probably a part of `undefined`
}
const toSelect: shaka.extern.Track | undefined = player
.getTextTracks()
.filter(filterTextTracks)
.find((t, index) => {
return String(index) === track.internalId
})
// TODO: We cant really control what track is selected on Dash. So far it looks like fulls subs are always the first entry
// which results in this function working as required, but might cause issues if this is not the case.
player.selectTextTrack(toSelect)
// silly safari bug fix, does not update if the state was incorrectly true already
// player.setTextTrackVisibility(false)
player.setTextTrackVisibility(true) For AudioTracks it is even worse, especially on Safari where we need to use the following: player.configure({
abr: {
enabled: false,
},
})
// CAREFUL! This causes the previous track to be shown as 'active=true' for short period of time, which needs to be
// see: https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html#.Track ->
// active: 'If true, this is the track being streamed (another track may be visible/audible in the buffer).'
// We, therefore, pass the currently selected track to distinguish between the active tracks from getVariantTracks().
player.selectVariantTrack(
player.getVariantTracks().find(t => t.label === track.internalId),
true
)
player.configure({
abr: {
enabled: true,
},
}) |
bump |
Description
When providing multiple subtitle tracks in dash, not every track is selectable. This happens if the
lang=".."
attribute has the same value more than once. Only the first one is selectableIn the manifest, the
<AdaptationSet mimeType="text/vtt" lang="de">
is contained twice.Once with a label "Deutsch" and once with "forced", but only "de" will be shown, so a related issue is that
Label
is ignored!This is contained twice (with different labels):
Sources
Playlist that does not work:
https://universum-dev-public.s3-eu-west-1.amazonaws.com/dash_fake_caption_de_de.mpd
In case the files ever lead to 404, here is the source:
Steps to reproduce
Test case:
application/dash+xml
de
:Results
Expected
Expected the text tracks list to show
Deutsch
andForced
instead ofde
once.Additional Information
If you use
https://universum-dev-public.s3-eu-west-1.amazonaws.com/dash_fake_caption_de_en.mpd
it will separate the two tracks. All I did was to change the second
lang
toen
instead ofde
!videojs-http-streaming version
what version of videojs-http-streaming does this occur with?
videojs-http-streaming 1.10.4
( latest from example page )
videojs version
what version of videojs does this occur with?
video.js 7.5.5
Browsers
Tested in
Platforms
what platforms are affected? please include operating system and version or device and version for each
The text was updated successfully, but these errors were encountered: