Stay organized with collections Save and categorize content based on your preferences.

Tracks

class Tracks : Bundleable


Information about groups of tracks.

Summary

Nested types

class Tracks.Group : Bundleable

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 Bundleable.Creator<Tracks!>!

Object that can restore tracks from a Bundle.

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?)
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
isTypeSupported(
    @C.TrackType trackType: Int,
    allowExceedsCapabilities: Boolean
)

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

Boolean

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

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

This function is deprecated.

Use containsType and isTypeSupported.

Boolean

This function is deprecated.

Use containsType and isTypeSupported.

Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

ImmutableList<Tracks.Group!>!

Constants

CREATOR

@UnstableApi
const val CREATORBundleable.Creator<Tracks!>!

Object that can restore tracks from a Bundle.

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

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,
    allowExceedsCapabilities: Boolean
): Boolean

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

Parameters
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.

isTypeSupported

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

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

isTypeSupportedOrEmpty

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

isTypeSupportedOrEmpty

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

toBundle

@UnstableApi
fun toBundle(): Bundle!

Returns a Bundle representing the information stored in this object.

Public properties

groups

val groupsImmutableList<Tracks.Group!>!