docs/doc/reference/com/google/android/exoplayer2/trackselection/RandomTrackSelection.Factory.html
Package com.google.android.exoplayer2.trackselection
All Implemented Interfaces:ExoTrackSelection.FactoryEnclosing class:RandomTrackSelection
public static final classRandomTrackSelection.Factoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ExoTrackSelection.Factory](ExoTrackSelection.Factory.html "interface in com.google.android.exoplayer2.trackselection")
Factory for RandomTrackSelection instances.
Constructors | Constructor | Description |
| --- | --- |
| Factory() | |
| Factory(int seed) | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| @NullableType ExoTrackSelection[] | createTrackSelections(@NullableType ExoTrackSelection.Definition[] definitions, BandwidthMeter bandwidthMeter, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline) |
Creates track selections for the provided Definitions.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public Factory()
-
public Factory(int seed)
Parameters:seed - A seed for the Random instance used by the factory.
-
public @NullableType[ExoTrackSelection](ExoTrackSelection.html "interface in com.google.android.exoplayer2.trackselection")[] createTrackSelections(@NullableType[ExoTrackSelection.Definition](ExoTrackSelection.Definition.html "class in com.google.android.exoplayer2.trackselection")[] definitions,[BandwidthMeter](../upstream/BandwidthMeter.html "interface in com.google.android.exoplayer2.upstream")bandwidthMeter,[MediaSource.MediaPeriodId](../source/MediaSource.MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId,[Timeline](../Timeline.html "class in com.google.android.exoplayer2")timeline)
Description copied from interface: ExoTrackSelection.Factory
Creates track selections for the provided Definitions.
Implementations that create at most one adaptive track selection may use TrackSelectionUtil.createTrackSelectionsForDefinitions(com.google.android.exoplayer2.trackselection.ExoTrackSelection.Definition[], com.google.android.exoplayer2.trackselection.TrackSelectionUtil.AdaptiveTrackSelectionFactory).
Specified by:createTrackSelections in interface ExoTrackSelection.FactoryParameters:definitions - A ExoTrackSelection.Definition array. May include null values.bandwidthMeter - A BandwidthMeter which can be used to select tracks.mediaPeriodId - The MediaSource.MediaPeriodId of the period for which tracks are to be selected.timeline - The Timeline holding the period for which tracks are to be selected.Returns:The created selections. Must have the same length as definitions and may include null values.