-
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
selectAudioLanguage with a "role" doesn't immediately select correct audio track #948
Comments
Previously, selecting a new audio track with selectAudioLanguage(), with the same language but different role, would only set the variants to switch to for ABR, but wouldn't actually switch to any of those variants at the moment of selection due to a bug in chooseStreams_(), which was still looking at only audio language as a differentiating mechanism. This change honors the role as well, so that a switch to the correct variants immediately happens. Closes shaka-project#948
Previously, selecting a new audio track with selectAudioLanguage(), with the same language but different role, would only set the variants to switch to for ABR, but wouldn't actually switch to any of those variants at the moment of selection due to a bug in chooseStreams_(), which was still looking at only audio language as a differentiating mechanism. This change honors the role as well, so that a switch to the correct variants immediately happens. Closes shaka-project#948
Previously, selecting a new audio/text track with selectAudioLanguage() or selectTextLanguage(), with the same language but different role, would only set the variants to switch to for ABR, but wouldn't actually switch to any of those variants at the moment of selection due to a bug in chooseStreams_(), which was still looking at only audio language as a differentiating mechanism. This change honors the role as well, so that a switch to the correct variants immediately happens. Closes shaka-project#948
Yes this seems to be fixed now. Thanks! |
I realize this issue still exists in 2.1.6. Makes sense because 7e0f469 isn't on that branch yet. Is there a plan to backport the fix? What's the policy for closing issues under these kinds of circumstances? |
I can confirm that this is still an issue on the v2.1.x branch. Confirming that was hard and involved a lot of hacks, which led me to file #967 to add roles to the demo app UI. I need to determine if backporting that refactor to v2.1.x is feasible. |
Backporting is not trivial, because the refactor touched some external interfaces. We can't change the AbrManager API mid-2.1.x. I'm looking into other solutions, including a partial reimplementation. |
Fixed for v2.1.7. Thanks! |
This bug can be reproduced only if there are audio tracks with the same language, but different roles. Selecting a new audio track is effectively a no-op. Stepping through the code, this is due to a bug in chooseStreams_() in player.js, which only checks for if language has changed between the selected and currently active track, when deciding whether to actually switch tracks or not (it does look like it's setting the correct list of variants for ABR though, since 4012194 for #767 , so I believe ABR would eventually set the desired audio track eventually).
The text was updated successfully, but these errors were encountered: