docs/doc/reference/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.html
Package com.google.android.exoplayer2.trackselection
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTrackSelectionUtilextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Track selection related utility methods.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | TrackSelectionUtil.AdaptiveTrackSelectionFactory |
Deprecated.
Functional interface to create a single adaptive track selection. |
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static Tracks | buildTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, @NullableType TrackSelection[] selections) |
Deprecated.
Returns Tracks built from MappingTrackSelector.MappedTrackInfo and TrackSelections for each renderer.
|
| static Tracks | buildTracks(MappingTrackSelector.MappedTrackInfo mappedTrackInfo, List<? extends TrackSelection>[] selections) |
Deprecated.
Returns Tracks built from MappingTrackSelector.MappedTrackInfo and TrackSelections for each renderer.
|
| static LoadErrorHandlingPolicy.FallbackOptions | createFallbackOptions(ExoTrackSelection trackSelection) |
Deprecated.
Returns the LoadErrorHandlingPolicy.FallbackOptions with the tracks of the given ExoTrackSelection and with a single location option indicating that there are no alternative locations available.
|
| static @NullableType ExoTrackSelection[] | createTrackSelectionsForDefinitions(@NullableType ExoTrackSelection.Definition[] definitions, TrackSelectionUtil.AdaptiveTrackSelectionFactory adaptiveTrackSelectionFactory) |
Deprecated.
Creates track selections for an array of track selection definitions, with at most one multi-track adaptive selection.
|
| static DefaultTrackSelector.Parameters | updateParametersWithOverride(DefaultTrackSelector.Parameters parameters, int rendererIndex, TrackGroupArray trackGroupArray, boolean isDisabled, DefaultTrackSelector.SelectionOverride override) |
Deprecated.
Updates DefaultTrackSelector.Parameters with an override.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static @NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] createTrackSelectionsForDefinitions(@NullableType[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection")[] definitions,[TrackSelectionUtil.AdaptiveTrackSelectionFactory](TrackSelectionUtil.AdaptiveTrackSelectionFactory.html "interface in com.google.android.exoplayer2.trackselection")adaptiveTrackSelectionFactory)
Deprecated.
Creates track selections for an array of track selection definitions, with at most one multi-track adaptive selection.
Parameters:definitions - The list of track selection definitions. May include null values.adaptiveTrackSelectionFactory - A factory for the multi-track adaptive track selection.Returns:The array of created track selection. For null entries in definitions returns null values.
-
public static[DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")updateParametersWithOverride([DefaultTrackSelector.Parameters](DefaultTrackSelector.Parameters.html "class in com.google.android.exoplayer2.trackselection")parameters,
int rendererIndex,[TrackGroupArray](../source/TrackGroupArray.html "class in com.google.android.exoplayer2.source")trackGroupArray,
boolean isDisabled,
@Nullable[DefaultTrackSelector.SelectionOverride](DefaultTrackSelector.SelectionOverride.html "class in com.google.android.exoplayer2.trackselection")override)
Deprecated.
Updates DefaultTrackSelector.Parameters with an override.
Parameters:parameters - The current DefaultTrackSelector.Parameters to build upon.rendererIndex - The renderer index to update.trackGroupArray - The TrackGroupArray of the renderer.isDisabled - Whether the renderer should be set disabled.override - An optional override for the renderer. If null, no override will be set and an existing override for this renderer will be cleared.Returns:The updated DefaultTrackSelector.Parameters.
-
public static[LoadErrorHandlingPolicy.FallbackOptions](../upstream/LoadErrorHandlingPolicy.FallbackOptions.html "class in com.google.android.exoplayer2.upstream")createFallbackOptions([ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")trackSelection)
Deprecated.
Returns the LoadErrorHandlingPolicy.FallbackOptions with the tracks of the given ExoTrackSelection and with a single location option indicating that there are no alternative locations available.
Parameters:trackSelection - The track selection to get the number of total and excluded tracks.Returns:The LoadErrorHandlingPolicy.FallbackOptions for the given track selection.
-
public static[Tracks](../Tracks.html "class in com.google.android.exoplayer2")buildTracks([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,
@NullableType[TrackSelection](TrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] selections)
Deprecated.
Returns Tracks built from MappingTrackSelector.MappedTrackInfo and TrackSelections for each renderer.
Parameters:mappedTrackInfo - The MappingTrackSelector.MappedTrackInfoselections - The track selections, indexed by renderer. A null entry indicates that a renderer does not have any selected tracks.Returns:The corresponding Tracks.
-
public static[Tracks](../Tracks.html "class in com.google.android.exoplayer2")buildTracks([MappingTrackSelector.MappedTrackInfo](MappingTrackSelector.MappedTrackInfo.html "class in com.google.android.exoplayer2.trackselection")mappedTrackInfo,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<? extends[TrackSelection](TrackSelection.html "interface in com.google.android.exoplayer2.trackselection")>[] selections)
Deprecated.
Returns Tracks built from MappingTrackSelector.MappedTrackInfo and TrackSelections for each renderer.
Parameters:mappedTrackInfo - The MappingTrackSelector.MappedTrackInfoselections - The track selections, indexed by renderer. Null entries are not permitted. An empty list indicates that a renderer does not have any selected tracks.Returns:The corresponding Tracks.