Google 致力于为黑人社区推动种族平等。查看具体举措

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