class Tracks


Information about groups of tracks.

Summary

Nested types

Information about a single group of tracks, including the underlying TrackGroup, the level to which each track is supported by the player, and whether any of the tracks are selected.

Constants

const Tracks!

Empty tracks.

Public constructors

Constructs an instance.

Public functions

Boolean

Returns true if there are tracks of type trackType, and false otherwise.

Boolean
equals(other: Any?)
java-static Tracks!

Restores a Tracks from a Bundle.

Int
Boolean

Returns true if there are no tracks, and false otherwise.

Boolean

Returns true if at least one track of the type trackType is selected for playback.

Boolean

Returns true if at least one track of type trackType is supported.

Boolean
isTypeSupported(
    @C.TrackType trackType: Int,
    allowExceedsCapabilities: Boolean
)

Returns true if at least one track of type trackType is supported.

Boolean

This function is deprecated.

Use containsType and isTypeSupported.

Boolean
@UnstableApi
isTypeSupportedOrEmpty(
    @C.TrackType trackType: Int,
    allowExceedsCapabilities: Boolean
)

This function is deprecated.

Use containsType and isTypeSupported.

Bundle!

Public properties

ImmutableList<Tracks.Group!>!

Constants

EMPTY

const val EMPTYTracks!

Empty tracks.

Public constructors

Tracks

@UnstableApi
Tracks(groups: (Mutable)List<Tracks.Group!>!)

Constructs an instance.

Parameters
groups: (Mutable)List<Tracks.Group!>!

The groups of tracks.

Public functions

containsType

fun containsType(@C.TrackType trackType: Int): Boolean

Returns true if there are tracks of type trackType, and false otherwise.

equals

fun equals(other: Any?): Boolean

fromBundle

@UnstableApi
java-static fun fromBundle(bundle: Bundle!): Tracks!

Restores a Tracks from a Bundle.

hashCode

fun hashCode(): Int

isEmpty

fun isEmpty(): Boolean

Returns true if there are no tracks, and false otherwise.

isTypeSelected

fun isTypeSelected(@C.TrackType trackType: Int): Boolean

Returns true if at least one track of the type trackType is selected for playback.

isTypeSupported

fun isTypeSupported(@C.TrackType trackType: Int): Boolean

Returns true if at least one track of type trackType is supported.

isTypeSupported

fun isTypeSupported(
    @C.TrackType trackType: Int,
    allowExceedsCapabilities: Boolean
): Boolean

Returns true if at least one track of type trackType is supported.

Parameters
@C.TrackType trackType: Int

The track type to query support for.

allowExceedsCapabilities: Boolean

Whether to consider the track as supported if it has a supported MIME type, but otherwise exceeds the advertised capabilities of the device. For example, a video track for which there's a corresponding decoder whose maximum advertised resolution is exceeded by the resolution of the track. Such tracks may be playable in some cases.

isTypeSupportedOrEmpty

@UnstableApi
fun isTypeSupportedOrEmpty(@C.TrackType trackType: Int): Boolean

isTypeSupportedOrEmpty

@UnstableApi
fun isTypeSupportedOrEmpty(
    @C.TrackType trackType: Int,
    allowExceedsCapabilities: Boolean
): Boolean

toBundle

@UnstableApi
fun toBundle(): Bundle!

Public properties

groups

val groupsImmutableList<Tracks.Group!>!