Audio Track Question
See original GitHub issueHey,
I’m actually implementing the possibility of switching audio tracks on my player. I’ve some questions about this :
-
How I can be sure that
selectAudioLanguage()executed well or failed? It seems to return nothing but I can see that a AdaptionEvent is triggered when I switch audio tracks, but in the data event It doesn’t tell me that it was triggered by an audio track switch action. -
Also, In my DASH manifest, I can see that I have an Accessibility track, but when I call
getAudioLanguagesAndRoles, it doesn’t tell me if there is an accessibility track. Is there a way to recognise if my track is an accessibility track ? -
I would like to know If there also a way to get the current Audio track playing by the player? I know by default shaka player will play the
maintrack, but sometimes I have multiple tracks who gotmainrole and by that I dont know which track is playing. Is there an easy way to get the current track ?
Thank you 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (15 by maintainers)

Top Related StackOverflow Question
@fadomire what I would suggest you do is summary the requirements and your proposed solution as a feature request. That request will be reviewed by those on the team who are best equipped to discuss the details. Once the details have been worked-out, the work will be allocated resources as per its priority.
We should extend the
kindattribute to also apply to audio tracks based on theRole. So in your case it would bealternate. See section 5.8.5.5 of the DASH spec for these values and their interpretations. We should be careful about duplicateRoleelements, since there can bemainand another.As for the
Accessibilityelement, the DASH IOP specifies some values for this. With a@schemeIdUriofurn:mpeg:dash:role:2011: on video the value can besign,subtitle, orcaption; with audio it can bedescriptionandenhanced-audio-intelligibility; with text it can bedescriptionorcaption.Your
@schemeIdUriisn’t specified, but thats allowed. Since we focus on DASH and the DASH IOP, I’d be hesitant to add other specs in. How about adding the properties I described above according to the IOP guidelines?We could then expose those as
kindifAccessibilityis present, falling back toRoleif there isn’t one. You can get therolesproperty to get the raw roles.