TrackSelectorResult


@UnstableApi
class TrackSelectorResult


The result of a TrackSelector operation.

Summary

Public constructors

TrackSelectorResult(
    @NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!,
    @NullableType selections: Array<@NullableType ExoTrackSelection!>!,
    info: Any?
)

This function is deprecated.

Use TrackSelectorResult.

TrackSelectorResult(
    @NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!,
    @NullableType selections: Array<@NullableType ExoTrackSelection!>!,
    tracks: Tracks!,
    info: Any?
)

Public functions

Boolean

Returns whether this result is equivalent to other for all renderers.

Boolean

Returns whether this result is equivalent to other for the renderer at the given index.

Boolean

Returns whether the renderer at the specified index is enabled.

Public properties

Any?

An opaque object that will be returned to onSelectionActivated should the selections be activated.

Int

The number of selections in the result.

Array<@NullableType RendererConfiguration!>!

A RendererConfiguration for each renderer.

Array<@NullableType ExoTrackSelection!>!

A ExoTrackSelection array containing the track selection for each renderer.

Tracks!

Describe the tracks and which one were selected.

Public constructors

TrackSelectorResult

TrackSelectorResult(
    @NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!,
    @NullableType selections: Array<@NullableType ExoTrackSelection!>!,
    info: Any?
)
Parameters
@NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!

A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.

@NullableType selections: Array<@NullableType ExoTrackSelection!>!

A ExoTrackSelection array containing the selection for each renderer.

info: Any?

An opaque object that will be returned to onSelectionActivated should the selection be activated. May be null.

TrackSelectorResult

TrackSelectorResult(
    @NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!,
    @NullableType selections: Array<@NullableType ExoTrackSelection!>!,
    tracks: Tracks!,
    info: Any?
)
Parameters
@NullableType rendererConfigurations: Array<@NullableType RendererConfiguration!>!

A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.

@NullableType selections: Array<@NullableType ExoTrackSelection!>!

A ExoTrackSelection array containing the selection for each renderer.

tracks: Tracks!

Description of the available tracks and which one were selected.

info: Any?

An opaque object that will be returned to onSelectionActivated should the selection be activated. May be null.

Public functions

isEquivalent

fun isEquivalent(other: TrackSelectorResult?): Boolean

Returns whether this result is equivalent to other for all renderers.

Parameters
other: TrackSelectorResult?

The other TrackSelectorResult. May be null, in which case false will be returned.

Returns
Boolean

Whether this result is equivalent to other for all renderers.

isEquivalent

fun isEquivalent(other: TrackSelectorResult?, index: Int): Boolean

Returns whether this result is equivalent to other for the renderer at the given index. The results are equivalent if they have equal track selections and configurations for the renderer.

Parameters
other: TrackSelectorResult?

The other TrackSelectorResult. May be null, in which case false will be returned.

index: Int

The renderer index to check for equivalence.

Returns
Boolean

Whether this result is equivalent to other for the renderer at the specified index.

isRendererEnabled

fun isRendererEnabled(index: Int): Boolean

Returns whether the renderer at the specified index is enabled.

Public properties

info

val infoAny?

An opaque object that will be returned to onSelectionActivated should the selections be activated.

length

val lengthInt

The number of selections in the result. Greater than or equal to zero.

rendererConfigurations

@NullableType
val rendererConfigurationsArray<@NullableType RendererConfiguration!>!

A RendererConfiguration for each renderer. A null entry indicates the corresponding renderer should be disabled.

selections

@NullableType
val selectionsArray<@NullableType ExoTrackSelection!>!

A ExoTrackSelection array containing the track selection for each renderer.

tracks

val tracksTracks!

Describe the tracks and which one were selected.