The static and dynamic metadata now build up in a list, such that when
the MediaMetadata is built, they are applied in an event order. This
means that newer/fresher values will overwrite older ones. The MediaItem
values are then applied at the end, as they take priority over any other.
#minor-release
PiperOrigin-RevId: 405383177
The current API exposes an `ImmutableMap` of
`TrackGroup` -> `TrackSelectionOverride`.
This has several disadvantages:
- A difficult to use API for mutation
(`ImmutableMap.Builder` doesn't support key removal).
- There is no track selection specific methods,
how the generic map API mapps to the selection override is not complex
but to obvious for a casual reader.
- The internal data type is exposed, making internal refactor difficult.
This was done to have the API ready as quick as possible.
When transitioning the clients to the map API in <unknown commit>,
it became clear that the map API was too verbose and not mapping
to the clients needs, so utility methods
were added to make operations clearer and more concise.
Nevertheless, having to use utility method to use easily and correctly
an API is not the sign of a good API.
This cl refactors the track selection API for several improvements:
- Add a type `TrackSelectionParameters` that encapsulate the internal
data structure (map currently).
- For iteration, expose as a list.
- Add a `Builder` for easy mutable operations.
- Add track selection specific methods to avoid having utilities functions.
- Those operations are the same as `DefaultTrackSelector.Parameters`
for easier migration. (`setOverride` was renamed to `addOverride`)
- Move `TrackSelection` classes outside of `TrackSelectionParameters`
as their own top level classes.
The migration of the client code is straightforward as most of it
were already using the previously mentioned utility functions
that are now native methods.
The full migration has not been done yet, and is pending on this cl approval.
PiperOrigin-RevId: 405362719
Builder setters should only accept null when the underlying property can
be null. In this case null is directly converted to an empty map/list.
PiperOrigin-RevId: 403406626
The previous name is quite easy to misread because it sounds like it
splits up like "(session) for (clear types)" when it's meant to be
"(session for clear) (types)".
The old field is left deprecated for backwards compatibility. The
DrmConfiguration.Builder methods are directly renamed without
deprecation because they're not yet present in a released version of
the library.
PiperOrigin-RevId: 403338799
The possibilities to set a ControlDispatcher have been removed in
<unknown commit> so that the ControlDispatcher is always a
DefaultControlDispatcher.
PiperOrigin-RevId: 403327092
Common houses DataSource as an interface for reading data,
but most of the concrete implementations are in ExoPlayer.
This means that in practice, if an app wants to use a module
that reads using DataSource (e.g. extractor), they may be
forced to depend on ExoPlayer as well to get a concrete
implementation (e.g. FileDataSource). This change moves the
DataSource implementations into common to resolve this.
PiperOrigin-RevId: 403222081
Also fix a typo where windowIndex was being passed to Objects.hashCode
twice.
The old field is left deprecated for backwards compatibility. Usages
will be migrated in an upcoming change.
PiperOrigin-RevId: 403049260
Update the UI module, the demos and most other users
to make use of the new player TracksInfo and track
selection override APIs.
PiperOrigin-RevId: 402817857
*** Original commit ***
Rollback of 8ed6c9fcf5
*** Original commit ***
Fix capitalization of language in track selector
Issue: #9452
***
***
PiperOrigin-RevId: 400942287
TracksInfo is very similar to
`MappingTrackSelector.MappedTracksInfo` with some
fields removed to simplify the Player API,
notably it doesn't expose the renderer concept.
A significant difference is the addition of a `selected` boolean
field which avoids having a separate `getCurrentTrackSelection`
API.
This cl is a part of the bigger track selection change,
splitted for ease of review.
In particular, the MediaSession implementation and UI usage
have been slitted in child cls.
Find all cls with the tag:
#player-track-selection
PiperOrigin-RevId: 400937124
It calls through to a deprecated method, which is unusual for a
convenience method, and the deprecated method has various
implementations. This allows for a smoother removal of stop(boolean)
and removes an obstacle for the ExoPlayer-SimpleExoPlayer merge.
Adds missing @Deprecated tags to some Players.
PiperOrigin-RevId: 400213422
Usages of the (already deprecated) Subtitle constructors were not
migrated, as it would require migrating to the Builder which is a more
involved change.
PiperOrigin-RevId: 400153139
This is more consistent with the other MediaItem inner classes which are
all Configurations.
The old class and fields are left deprecated for backwards
compatibility.
The deprecated Subtitle constructors are not moved to
SubtitleConfiguration.
PiperOrigin-RevId: 400144640
This moves `SelectionOverride` from `DefaultTrackSelector`
to `TrackSelectionParameters`.
It is then use to allow track selection override per
track selection array.
Note that contrary to
`DefaultTrackSelector.Parameters.selectionOverride`, the renderer
concept is not exposed.
This cl is a part of the bigger track selection change,
splitted for ease of review.
Find all cls with the tag:
#player-track-selection
PiperOrigin-RevId: 399933612