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 classTracks.GroupDeprecated.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 booleancontainsType(@com.google.android.exoplayer2.C.TrackType int trackType)Deprecated.Returns true if there are tracks of typetrackType, and false otherwise.booleanequals(Object other)Deprecated.ImmutableList<Tracks.Group>getGroups()Deprecated.Returns thegroupsof tracks.inthashCode()Deprecated.booleanisEmpty()Deprecated.Returnstrueif there are no tracks, andfalseotherwise.booleanisTypeSelected(@com.google.android.exoplayer2.C.TrackType int trackType)Deprecated.Returns true if at least one track of the typetrackTypeis selected for playback.booleanisTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType)Deprecated.Returns true if at least one track of typetrackTypeissupported.booleanisTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)Deprecated.Returns true if at least one track of typetrackTypeissupported.booleanisTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)Deprecated.UsecontainsType(int)andisTypeSupported(int).booleanisTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)Deprecated.BundletoBundle()Deprecated.Returns aBundlerepresenting 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- Thegroupsof tracks.
-
-
Method Detail
-
getGroups
public ImmutableList<Tracks.Group> getGroups()
Deprecated.Returns thegroupsof tracks.
-
isEmpty
public boolean isEmpty()
Deprecated.Returnstrueif there are no tracks, andfalseotherwise.
-
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 typetrackTypeissupported.
-
isTypeSupported
public boolean isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities)Deprecated.Returns true if at least one track of typetrackTypeissupported.- 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 typetrackTypeis selected for playback.
-
toBundle
public Bundle toBundle()
Deprecated.Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-