Class Tracks

  • All Implemented Interfaces:
    Bundleable

    @Deprecated
    public final class Tracks
    extends Object
    implements Bundleable
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Information about groups of tracks.
    • Field Detail

      • EMPTY

        public static final Tracks EMPTY
        Deprecated.
        Empty tracks.
    • Constructor Detail

      • Tracks

        public Tracks​(List<Tracks.Group> groups)
        Deprecated.
        Constructs an instance.
        Parameters:
        groups - The groups of tracks.
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Deprecated.
        Returns true if there are no tracks, and false otherwise.
      • containsType

        public boolean containsType​(@com.google.android.exoplayer2.C.TrackType int trackType)
        Deprecated.
        Returns true if there are tracks of type trackType, and false otherwise.
      • isTypeSupported

        public boolean isTypeSupported​(@com.google.android.exoplayer2.C.TrackType int trackType)
        Deprecated.
        Returns true if at least one track of type trackType is supported.
      • isTypeSupported

        public boolean isTypeSupported​(@com.google.android.exoplayer2.C.TrackType int trackType,
                                       boolean allowExceedsCapabilities)
        Deprecated.
        Returns true if at least one track of type trackType is supported.
        Parameters:
        trackType - The track type to query support for.
        allowExceedsCapabilities - Whether to consider the track as supported if it has a supported MIME type, but otherwise exceeds the advertised capabilities of the device. For example, a video track for which there's a corresponding decoder whose maximum advertised resolution is exceeded by the resolution of the track. Such tracks may be playable in some cases.
      • isTypeSelected

        public boolean isTypeSelected​(@com.google.android.exoplayer2.C.TrackType int trackType)
        Deprecated.
        Returns true if at least one track of the type trackType is selected for playback.
      • equals

        public boolean equals​(@Nullable
                              Object other)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • toBundle

        public Bundle toBundle()
        Deprecated.
        Description copied from interface: Bundleable
        Returns a Bundle representing the information stored in this object.
        Specified by:
        toBundle in interface Bundleable