Google is committed to advancing racial equity for Black communities. See how.

MediaPlayer.TrackInfo

public static final class MediaPlayer.TrackInfo
extends SessionPlayer.TrackInfo

java.lang.Object
   ↳ androidx.media2.common.SessionPlayer.TrackInfo
     ↳ androidx.media2.player.MediaPlayer.TrackInfo


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

Summary

Inherited constants

Public methods

MediaFormat getFormat()

Gets the MediaFormat of the track.

Inherited methods

Public methods

getFormat

public MediaFormat getFormat ()

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

Returns
MediaFormat