-
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
Overrides not populated by default in TrackSelectionDialogBuilder #10429
Comments
Thanks for reporting! To achieve what you want I think you can do
I'm not sure about whether not setting the overrides in the constructor is the intended behaviour. It's meant to present the dialog without a pre-selection. The selection then can be done by using the setter Agreed that it could be the other way around and then to prevent a preselection, an app can do We need to discuss internally whether we want to change this to default to a pre-selection when the player is passed. Do you agree I change this from bug to enhancement? As in, by using the setter you can achieve what you want? |
Yes, that's what I do now, just that I had to dig into code a bit to understand why the previous selection was not saved and would always reset. So that waa a bit confusing and unexpected, if you have to use this dialog.
Sure, that's fine. |
Issue: google/ExoPlayer#10429 PiperOrigin-RevId: 461577039
Issue: #10429 PiperOrigin-RevId: 461577039
…anges #minor-release PiperOrigin-RevId: 462391856
ExoPlayer Version
2.18.0
Devices that reproduce the issue
Any
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
When building
TrackSelectionDialogBuilder
using constructor with thePlayer
argument, builder does not take into account existing overrides and by default the dialog will always selectAuto
option.Expected result
In the
TrackSelectionDialogBuilder
constructor it could already take available overrides from theplayer
instance viaplayer.getTrackSelectionParameters().getOverrides()
instead of having empty map:ExoPlayer/library/ui/src/main/java/com/google/android/exoplayer2/ui/TrackSelectionDialogBuilder.java
Line 111 in 03569f9
So that you wouldn't need to explore the source code to understand why the previous selection in the dialog is not pre-selected when opening the dialog again.
Actual result
When constructing
TrackSelectionDialogBuilder
the overrides are left empty and you have to know that you need to provide them manually via.setOverrides(player.getTrackSelectionParameters().getOverrides())
Media
Not applicable
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: