SessionPlayer.TrackInfo

public static class SessionPlayer.TrackInfo
extends Object implements VersionedParcelable

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


Class for the player to return each audio/video/subtitle track's metadata. Note: TrackInfo holds a MediaFormat instance, but only the following key-values will be supported when sending it over different processes:

Summary

Constants

int MEDIA_TRACK_TYPE_AUDIO

int MEDIA_TRACK_TYPE_METADATA

int MEDIA_TRACK_TYPE_SUBTITLE

int MEDIA_TRACK_TYPE_UNKNOWN

int MEDIA_TRACK_TYPE_VIDEO

Public constructors

TrackInfo(int id, int type, MediaFormat format)

Constructor to create a TrackInfo instance.

TrackInfo(int id, int type, MediaFormat format, boolean isSelectable)

Constructor to create a TrackInfo instance.

Public methods

boolean equals(Object obj)
MediaFormat getFormat()

Gets the MediaFormat of the track.

int getId()

Gets the id of the track.

Locale getLanguage()

Gets the language code of the track.

int getTrackType()

Gets the track type.

int hashCode()
boolean