Also make combination of language and role flags the default over the label,
as it's more readable and auto-translated into other languages.
PiperOrigin-RevId: 240801070
This allows to distinguish between regional variants and scripts.
We still need to normalize the language code itself to make track selection
independent of the whether 2 or 3 letter codes are used.
PiperOrigin-RevId: 239783115
This replaces the deprecated usages of RobolectricTestRunner and
RuntimeEnvironent and fully migrates the tests to androidx.
PiperOrigin-RevId: 238011667
There are 6 different situations which are now more explicitly covered to
ensure we handle them correctly:
1. Radio button (non-adaptive, single group only)
Selected -> Do nothing.
Unselected -> Replace override with selected track.
2. Check box (non-adaptive, but multi-group allowed)
Selected -> Remove track (and override). If last one, set isDisabled flag.
Unselected -> Replace override with selected track.
3. Check box (adaptive allowed, single or multi group)
Selected -> Remove track. If last, remove override and maybe set isDisabled.
Unselected -> Add track to override.
PiperOrigin-RevId: 236668642
Instead just set the currently clicked item as override. If the already
selected button is clicked, the override is reset with the same value.
PiperOrigin-RevId: 236118429
We currently do not show check boxes if the renderer does not support adaptive
switches between tracks in one group. However, we assume check boxes in the
onClick method.
Use same logic for both methods to be consistent.
PiperOrigin-RevId: 236118372
Currently IMA determines that the overlay is obstructing, even
if it's empty. Register it as friendly, which means we're
assuming that anything the apps puts in it is necessary for
playback.
PiperOrigin-RevId: 234963065
Horizontal orientation doesn't make sense. I thought about
overriding the setter to throw something, but it's probably
not worth the extra lines.
PiperOrigin-RevId: 234632530
TrackSelectionView requires an initialization with a call to init(...).
That's why we shouldn't let the view retain its view hierarchy automatically
as the views won't be backed by data if restored. Instead add a listener
which lets the containing activity/fragment save and restore the state if
needed.
PiperOrigin-RevId: 234152491
builder.mActions is marked as @RestrictTo(LIBRARY_GROUP). We'll
just have to put up with notification flicker on KitKat if the
actions change.
PiperOrigin-RevId: 233420076
Switch from passing an ad UI ViewGroup to passing an object that can also
provide information about controls overlays.
Also switch to using a dedicated overlay for ads instead of the overlay frame
layout, which apps have easy access to.
PiperOrigin-RevId: 233393500
Supporting multiple overrides allows to select tracks from multiple groups, if
enabled. As more options are added, the creation of the dialog is moved to a
separate builder class.
PiperOrigin-RevId: 233366282
Now we're reusing the builder, it's necessary to set maxProgress
back to 0 to avoid the progress bar appearing for end state
notifications.
PiperOrigin-RevId: 232520007
The combination of pre-16 API levels accounting for ~0.5% of the device
population, and that the most important components in ExoPlayer (e.g.
the MediaCodec renderers) have always required API level 16, mean it's
very unlikely this will negatively impact on anyone.
PiperOrigin-RevId: 230701808
Made DownloadState top level class.
Replaced action field DownloadAction fields.
Added removing, removed and restarting states.
Renamed started state to downloading.
PiperOrigin-RevId: 227664735
This also applies when seeking or transitioning to unprepared media, which
isn't clear from the current documentation.
Issue:#5267
PiperOrigin-RevId: 226486685