MediaPlayer.TrackInfo

Added in 1.0.0
Deprecated in 1.3.0

public final class MediaPlayer.TrackInfo extends SessionPlayer.TrackInfo


Class for the player to return each audio/video/subtitle track's metadata.

See also
getTracks

Summary

Public methods

@Nullable MediaFormat

Gets the MediaFormat of the track.

Inherited Constants

From androidx.media2.common.SessionPlayer.TrackInfo
static final int
static final int
static final int
static final int
static final int

Inherited methods

From androidx.media2.common.SessionPlayer.TrackInfo
boolean
int

Gets the id of the track.

@NonNull Locale

Gets the language code of the track.

int

Gets the track type.

int
boolean

Whether the current track can be selected via selectTrack or not.

@NonNull String

Public methods

getFormat

Added in 1.0.0
public @Nullable MediaFormat getFormat()

Gets the MediaFormat of the track. If the format is unknown or could not be determined, null is returned.