MediaPlayer.TrackInfo

Added in 1.0.0
Deprecated in 1.3.0

class MediaPlayer.TrackInfo : SessionPlayer.TrackInfo


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

See also
getTracks

Summary

Public functions

MediaFormat?

Gets the MediaFormat of the track.

Inherited functions

From androidx.media2.common.SessionPlayer.TrackInfo
Boolean
equals(obj: Any?)
Int

Gets the id of the track.

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.

String

Public functions

getFormat

Added in 1.0.0
fun getFormat(): MediaFormat?

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