-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Change in behavior of selection override in 2.16.0 #9665
Comments
I believe this is working as intended, although I can see how it might not be obvious why. ExoPlayer 2.16.0 introduced new track selection APIs in the In any case, the selection overrides are the input to the track selection algorithm, not the output that tells you which tracks are actually selected. So to check which text track is selected, you should not query the configuration parameters, but the actually selected tracks:
There are still two things to fix here:
|
What would be the best way to detect user selected "Auto" audio track (in |
I think this is the only way to make sure, yes. We have a private method |
The setters in the Builder are already deprecated and using the old getter is error-prone as they only return the overrides set with the deprecated setters. Issue: #9665 PiperOrigin-RevId: 408817640
This method is helpful when iterating the list of track overrides to figure out which type the override applies to. Issue: #9665 PiperOrigin-RevId: 409108977
The setters in the Builder are already deprecated and using the old getter is error-prone as they only return the overrides set with the deprecated setters. Issue: #9665 PiperOrigin-RevId: 408817640
This method is helpful when iterating the list of track overrides to figure out which type the override applies to. Issue: #9665 PiperOrigin-RevId: 409108977
The only way right now is to check if any trackGroup in Just looking for any overrides of a given type doesn't give the expected information because that override could be left from a previous Media. Eg. VideoA has an override, VideoB starts playing, the VideoA override is still present but ignored as it doesn't match any trackGroup from VideoB (the player doesn't remove overrides on track transition). @tonihei I had considered to change the selected boolean in each TrackInfo to a selectedReason flag. That would allow to specify why each trackGroup was selected (eg, override). |
Ah, yes, for playlists you'd also need to check if the track overrides are actually part of the current item.
I wonder if this is confusing because you can also select tracks by specifying a preferred language for example and for someone looking at the selected tracks, this is probably the same case (=a specific parameter preference has caused this selection). But if we include these settings in the reasons then it becomes hard to track which specific setting was responsible for selecting a track. |
I'll close this issue for now because all immediate bugs/questions have been addressed I believe. |
The setters in the Builder are already deprecated and using the old getter is error-prone as they only return the overrides set with the deprecated setters. Issue: google/ExoPlayer#9665 PiperOrigin-RevId: 408817640
This method is helpful when iterating the list of track overrides to figure out which type the override applies to. Issue: google/ExoPlayer#9665 PiperOrigin-RevId: 409108977
Follow up on #9649. (@tonihei)
I applied eb678a7 on top of r2.16.0 but I still have issues working with selection overrides. The same code which works on 2.15.1 doesn't work on 2.16.0. (Is there possibly more to this issue?)
On 2.15.1, I can use this to detect subtitle index. (Testing with the same video file as in the linked issue)
On 2.16.0, the selection override is always null.
I noticed that methods like
DefaultTrackSelector.ParametersBuilder.setSelectionOverride()
etc. are deprecated but nothing from the code above(getSelectionOverride
). (I would still expect the code to work the same though).The text was updated successfully, but these errors were encountered: