RandomTrackSelection.Factory


class RandomTrackSelection.Factory : ExoTrackSelection.Factory


Factory for RandomTrackSelection instances.

Summary

Public constructors

Factory(seed: Int)

Public functions

Array<ExoTrackSelection?>?
createTrackSelections(
    definitions: Array<ExoTrackSelection.Definition?>?,
    bandwidthMeter: BandwidthMeter!,
    mediaPeriodId: MediaSource.MediaPeriodId!,
    timeline: Timeline!
)

Creates track selections for the provided Definitions.

Public constructors

Factory

Factory()

Factory

Factory(seed: Int)
Parameters
seed: Int

A seed for the Random instance used by the factory.

Public functions

createTrackSelections

fun createTrackSelections(
    definitions: Array<ExoTrackSelection.Definition?>?,
    bandwidthMeter: BandwidthMeter!,
    mediaPeriodId: MediaSource.MediaPeriodId!,
    timeline: Timeline!
): Array<ExoTrackSelection?>?

Creates track selections for the provided Definitions.

Implementations that create at most one adaptive track selection may use createTrackSelectionsForDefinitions.

Parameters
definitions: Array<ExoTrackSelection.Definition?>?

A Definition array. May include null values.

bandwidthMeter: BandwidthMeter!

A BandwidthMeter which can be used to select tracks.

mediaPeriodId: MediaSource.MediaPeriodId!

The MediaPeriodId of the period for which tracks are to be selected.

timeline: Timeline!

The Timeline holding the period for which tracks are to be selected.

Returns
Array<ExoTrackSelection?>?

The created selections. Must have the same length as definitions and may include null values.