Package com.google.android.exoplayer2
Class Tracks
- java.lang.Object
-
- com.google.android.exoplayer2.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Tracks.Group
Deprecated.Information about a single group of tracks, including the underlyingTrackGroup
, the level to which each track is supported by the player, and whether any of the tracks are selected.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Constructor Summary
Constructors Constructor Description Tracks(List<Tracks.Group> groups)
Deprecated.Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsType(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if there are tracks of typetrackType
, and false otherwise.boolean
equals(Object other)
Deprecated.ImmutableList<Tracks.Group>
getGroups()
Deprecated.Returns thegroups
of tracks.int
hashCode()
Deprecated.boolean
isEmpty()
Deprecated.Returnstrue
if there are no tracks, andfalse
otherwise.boolean
isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if at least one track of the typetrackType
is selected for playback.boolean
isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if at least one track of typetrackType
issupported
.boolean
isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)
Deprecated.Returns true if at least one track of typetrackType
issupported
.boolean
isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.UsecontainsType(int)
andisTypeSupported(int)
.boolean
isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)
Deprecated.Bundle
toBundle()
Deprecated.Returns aBundle
representing the information stored in this object.
-
-
-
Field Detail
-
EMPTY
public static final Tracks EMPTY
Deprecated.Empty tracks.
-
CREATOR
public static final Bundleable.Creator<Tracks> CREATOR
Deprecated.Object that can restore tracks from aBundle
.
-
-
Constructor Detail
-
Tracks
public Tracks(List<Tracks.Group> groups)
Deprecated.Constructs an instance.- Parameters:
groups
- Thegroups
of tracks.
-
-
Method Detail
-
getGroups
public ImmutableList<Tracks.Group> getGroups()
Deprecated.Returns thegroups
of tracks.
-
isEmpty
public boolean isEmpty()
Deprecated.Returnstrue
if there are no tracks, andfalse
otherwise.
-
containsType
public boolean containsType(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if there are tracks of typetrackType
, and false otherwise.
-
isTypeSupported
public boolean isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if at least one track of typetrackType
issupported
.
-
isTypeSupported
public boolean isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)
Deprecated.Returns true if at least one track of typetrackType
issupported
.- Parameters:
trackType
- The track type to query support for.allowExceedsCapabilities
- Whether to consider the track as supported if it has a supportedMIME 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.
-
isTypeSupportedOrEmpty
@Deprecated public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.UsecontainsType(int)
andisTypeSupported(int)
.
-
isTypeSupportedOrEmpty
@Deprecated public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)
Deprecated.
-
isTypeSelected
public boolean isTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.Returns true if at least one track of the typetrackType
is selected for playback.
-
toBundle
public Bundle toBundle()
Deprecated.Description copied from interface:Bundleable
Returns aBundle
representing the information stored in this object.- Specified by:
toBundle
in interfaceBundleable
-
-