TrackSelectorHelper

Helper class to do several operations with the MappingTrackSelector selector.

Author

Sergio Martinez - smartinez@brightcove.com

Constructors

Link copied to clipboard
constructor(player: ExoPlayer, trackSelector: DefaultTrackSelector)
Instantiates a new Track selector helper.
constructor(player: ExoPlayer, trackSelector: DefaultTrackSelector, mediaStore: MediaStore)
Instantiates a new Track selector helper.

Functions

Link copied to clipboard
open fun applySelectionOverride(renderType: Int, selectionOverrideCreator: SelectionOverrideCreator)
Link copied to clipboard
open fun applyTrackSelectionOverrides(renderType: Int, trackSelectionOverrideCreator: TrackSelectionOverrideCreator)
Creates a {#TrackSelectionOverrides} with the TrackSelectionOverrideCreator and the render type.
Link copied to clipboard
open fun disableTrack(trackType: Int)
Disables the Renderer track.
Link copied to clipboard
open fun enableTrack(trackType: Int)
Enables the Renderer track.
Link copied to clipboard
open fun findOfflineFormatList(context: Context, formatList: List<Format>): List<Format>
Filter the Format list parameter returning only those stored in the device.
Link copied to clipboard
open fun getAudioTracksIndexMap(context: Context, deliveryType: DeliveryType, offline: Boolean): Map<Integer, String>
Creates a map from the Renderer of type TYPE_AUDIO with the track index and the language code.
Link copied to clipboard
open fun getAvailableFormatList(trackType: Int): List<Format>
Gets the available Format list by type.
Link copied to clipboard
open fun getRendererIndex(renderType: Int): Int
Gets the renderer index.
Link copied to clipboard
Gets the selected audio language if any.
Link copied to clipboard
open fun selectAudio(language: String)
Selects the audio language in the MappingTrackSelector if available.
Link copied to clipboard
open fun selectCaption(captions: BrightcoveCaptionFormat)
Selects the Brightcove caption in the @MappingTrackSelector if available.
Link copied to clipboard
open fun setPeakBitrate(peakBitrate: Int)
Link copied to clipboard
open fun updateTracksGroupInfos(trackGroupInfos: ImmutableList<Group>)
Updates the Track Group array.
Link copied to clipboard
open fun updateTracksSelectionArray(trackSelections: TrackSelectionArray)
Updates the Track Selection array.