public interface

ExoTrackSelection.Factory

 androidx.media3.exoplayer.trackselection.ExoTrackSelection.Factory

Subclasses:

RandomTrackSelection.Factory, AdaptiveTrackSelection.Factory

Overview

Factory for ExoTrackSelection instances.

Summary

Methods
public ExoTrackSelectioncreateTrackSelections(ExoTrackSelection.Definition definitions[], BandwidthMeter bandwidthMeter, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline)

Creates track selections for the provided Definitions.

Methods

public ExoTrackSelection createTrackSelections(ExoTrackSelection.Definition definitions[], BandwidthMeter bandwidthMeter, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline)

Creates track selections for the provided Definitions.

Implementations that create at most one adaptive track selection may use TrackSelectionUtil.createTrackSelectionsForDefinitions(ExoTrackSelection.Definition[], TrackSelectionUtil.AdaptiveTrackSelectionFactory).

Parameters:

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.