Skip to content
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

Select by role as well as language without disabling ABR #412

Closed
sanbornhilland opened this issue Jun 10, 2016 · 11 comments
Closed

Select by role as well as language without disabling ABR #412

sanbornhilland opened this issue Jun 10, 2016 · 11 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@sanbornhilland
Copy link
Contributor

Can you explain why abr gets disabled when selecting a different audio track? Most audio track switches are going to be for changing languages and I don't think this should interfere with abr for video tracks.

@TheModMaker
Copy link
Contributor

If you select a track using player.selectTrack, it will disable abr because you selected a specific track. If you want to change languages, you can use player.configure. This will cause it to switch tracks without disabling abr.

player.configure({preferredAudioLanguage: 'es'})

In the demo app, selecting a track from the drop-down list will use player.selectTrack. You can change the preferred language text box and press Enter and it will change to another language.

@joeyparrish joeyparrish added status: working as intended The behavior is intended; this is not a bug type: question A question from the community labels Jun 10, 2016
@joeyparrish
Copy link
Member

That's right. If your UI had manual track selection widget (like YouTube's 360p / 480p / 720p / 1080p / auto), that would connect to selectTrack. If your UI has a language selection widget, that should connect to configure.

If that's confusing or unhelpful, let us know while we're still in beta and we can reconsider.

@sanbornhilland
Copy link
Contributor Author

No, I think that is sensible. It should give greater control if we have multiple audio variants of the same language which I assume is the intention.

Thanks for clearing that up. I think it would be worth putting a note in the v2 migration guide about the difference in APIs in this respect from 1.x to 2.

@sanbornhilland
Copy link
Contributor Author

sanbornhilland commented Jun 14, 2016

Actually, on some further reflection and discussion I want to present a possible problematic scenario.

What happens if there are three audio tracks, all of them are english. Two of them are the same audio track with different bitrates but the third is the content audio plus directors commentary. How would we handle this situation? Selecting a specific track will turn off ABR which is not desirable if I want the player to handle switching bitrates between the first two tracks. But configuring the player for english tracks now is ambiguous because it doesn't allow us to specify if we want commentary or not.

Update
One way to handle this would be to expose the track role as specified in the manifest and allow for configuring the player for a preferred role as well as is already done with text tracks.

@joeyparrish joeyparrish changed the title ABR disabled when selecting audio tracks Select by role as well as language without disabling ABR Jun 22, 2016
@joeyparrish joeyparrish added type: enhancement New feature or request and removed type: question A question from the community status: working as intended The behavior is intended; this is not a bug labels Jun 22, 2016
@joeyparrish joeyparrish added this to the v2+ milestone Jun 22, 2016
@joeyparrish
Copy link
Member

Makes sense. In a nutshell, we should allow selection by both role and language without disabling ABR. Is configure() still the best interface for this?

I'm tentatively scheduling this for v2+, but if we have a design sooner we can consider it for v2.0.0.

@sanbornhilland
Copy link
Contributor Author

Assuming that configure() is triggered immediately then I don't see any reason not to continue to use this approach.

@joeyparrish
Copy link
Member

The current language switching via configure() is immediate, so the role switching could be as well.

@joeyparrish joeyparrish modified the milestones: v2+, v2.1.0 Oct 4, 2016
@joeyparrish joeyparrish assigned ismena and unassigned ismena Oct 4, 2016
@joeyparrish
Copy link
Member

After further consideration, I think we should stop using configure() in this way.

Proposal:

  • Configuration of preferred languages will only affect initial selections when content is loaded. Changing preferred languages during playback will affect the next piece of content to be loaded. The configuration represents a user preference, so it does not make sense to use the same mechanism to change languages during playback. Choosing a new language may be a temporary, manual decision and is not the same as changing a user's preferences.
  • New methods for language choices will be introduced in parallel to getTracks() and selectTrack(). Example: player.getLanguages('audio') or player.selectLanguage('audio', 'fr-CA') or player.selectLanguage('text', 'de', 'caption'). The role argument will be optional, and these APIs will be easy to hook up directly to language-related UI elements.
  • Changing languages will clear the buffer (so that the effect is immediate) but will not disable adaptation.
  • We will add language-related UI elements to our demo app controls to demonstrate how we would expect these methods to be used.

@sanbornhnewyyz, thoughts?

shaka-bot pushed a commit that referenced this issue Jan 18, 2017
Add UI options to select current audio and text language.
Split selectTrack() into selectText() and selectVariant().
Stop automatically disabling ABR manager when a variant is selected.
Add a warning if selectVariant() is called while abr is enabled.

Issue #412.
Issue #626.

Change-Id: I15f1c3c4fdc6d6b641f708fbef19dbcf10cbcfc6
@ismena
Copy link
Contributor

ismena commented Jan 27, 2017

Closing due to the fact that the new API has been implemented (and inactivity :)).
Feel free to reopen if you have issues or questions!

@ismena ismena closed this as completed Jan 27, 2017
@forbesjo
Copy link

I can see that there's a new API for selecting by audio language while keeping the ABR active, but I don't see how the role of the audio track is taken into account? How would a user enable a commentary track?

@joeyparrish
Copy link
Member

@forbesjo, I think we made a mistake on that. We are going to address it as part of #767.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants