TrackSelectionOverride
class TrackSelectionOverride
A track selection override, consisting of a TrackGroup and the indices of the tracks within the group that should be selected.
A track selection override is applied during playback if the media being played contains a TrackGroup equal to the one in the override. If a TrackSelectionParameters contains only one override of a given track type that applies to the media, this override will be used to control the track selection for that type. If multiple overrides of a given track type apply then the player will apply only one of them.
If trackIndices is empty then the override specifies that no tracks should be selected. Adding an empty override to a TrackSelectionParameters is similar to disabling a track type, except that an empty override will only be applied if the media being played contains a TrackGroup equal to the one in the override. Conversely, disabling a track type will prevent selection of tracks of that type for all media.
Summary
Public constructors |
|---|
TrackSelectionOverride(mediaTrackGroup: TrackGroup!, trackIndex: Int)Constructs an instance to force |
TrackSelectionOverride(Constructs an instance to force |
Public functions |
|
|---|---|
Boolean |
|
java-static TrackSelectionOverride! |
@UnstableApiRestores a |
Int |
Returns the |
Int |
hashCode() |
Bundle! |
Public properties |
|
|---|---|
TrackGroup! |
The media |
ImmutableList<Int!>! |
The indices of tracks in a |
Public constructors
TrackSelectionOverride
TrackSelectionOverride(mediaTrackGroup: TrackGroup!, trackIndex: Int)
Constructs an instance to force trackIndex in trackGroup to be selected.
| Parameters | |
|---|---|
mediaTrackGroup: TrackGroup! |
The media |
trackIndex: Int |
The index of the track in the |
TrackSelectionOverride
TrackSelectionOverride(
mediaTrackGroup: TrackGroup!,
trackIndices: (Mutable)List<Int!>!
)
Constructs an instance to force trackIndices in trackGroup to be selected.
| Parameters | |
|---|---|
mediaTrackGroup: TrackGroup! |
The media |
trackIndices: (Mutable)List<Int!>! |
The indices of the tracks in the |
Public functions
fromBundle
@UnstableApi
java-static fun fromBundle(bundle: Bundle!): TrackSelectionOverride!
Restores a TrackSelectionOverride from a Bundle.
Public properties
mediaTrackGroup
val mediaTrackGroup: TrackGroup!
The media TrackGroup whose trackIndices are forced to be selected.
trackIndices
val trackIndices: ImmutableList<Int!>!
The indices of tracks in a TrackGroup to be selected.