Audio Language Switching for Tracks with the Same Language and Role #5222
Labels
priority: P3
Useful but not urgent
status: archived
Archived and locked; will not be updated
type: enhancement
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
There's no way to effectively use
selectAudioLanguage
method if a DASH stream includes multiple audio tracks with the same language, role and channels count.For example, if Shaka returns the following audio tracks, I cannot set the correct track via
selectAudioLanguage
:It's not possible to set the second audio track with alternate role via
selectAudioLanguage(language, role, channelsCount)
as there's no way to distinguish between two tracks with the same language, role and audio channels count.Describe the solution you'd like
I would like to add support for language tags that are (more) compliant with RFC 5646. The values of
lang
attribute from DASHAdaptationSet
are restricted by RFC 5646. This RFC allows to add a "private use tag" (privateuse
) to the language tag (e.g.,en-GB-x-one
,en-US-x-1
).With the support of private use tag it is now possible to use
selectAudioLanguage
for the following tracks:Now I can use
selectAudioLanguage('en-US-x-2')
to select the second alternate audio track!Describe alternatives you've considered
The first idea that came to mind was using language and role pair as a key for a given audio track. But it's not possible, because according to DASH specification roles aren't unique.
I also considered using
selectVariantsByLabel
, but this method assumes that the label uniquely identifies an audio stream. And it also works across the combination of video and audio tracks. Thus, if I change a variant by label and then switch the video quality I need to track that the correct audio is selected. UsingselectAudioLanguage
is much less cumbersome.Additional context
The same problem exists for HLS streams.
The text was updated successfully, but these errors were encountered: