docs/doc/reference/com/google/android/exoplayer2/Tracks.html
Package com.google.android.exoplayer2
All Implemented Interfaces:Bundleable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classTracksextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
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 Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | Tracks.Group |
Deprecated.
Information about a single group of tracks, including the underlying TrackGroup, the level to which each track is supported by the player, and whether any of the tracks are selected.
|
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<Tracks> | CREATOR |
Deprecated.
Object that can restore tracks from a Bundle.
|
| static Tracks | EMPTY |
Deprecated.
Empty tracks. |
Constructors | Constructor | Description |
| --- | --- |
| Tracks(List<Tracks.Group> groups) |
Deprecated.
Constructs an instance. |
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 type trackType, and false otherwise.
|
| boolean | equals(Object other) |
Deprecated.
|
| ImmutableList<Tracks.Group> | getGroups() |
Deprecated.
Returns the groups of tracks.
|
| int | hashCode() |
Deprecated.
|
| boolean | isEmpty() |
Deprecated.
Returns true if there are no tracks, and false otherwise.
|
| 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.
|
| boolean | isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType) |
Deprecated.
Returns true if at least one track of type trackType is supported.
|
| 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.
|
| boolean | isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType) |
Deprecated.
Use containsType(int) and isTypeSupported(int).
|
| boolean | isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType, boolean allowExceedsCapabilities) |
Deprecated.
Use containsType(int) and isTypeSupported(int, boolean).
|
| Bundle | toBundle() |
Deprecated.
Returns a Bundle representing the information stored in this object.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public static final[Tracks](Tracks.html "class in com.google.android.exoplayer2")EMPTY
Deprecated.
Empty tracks.
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[Tracks](Tracks.html "class in com.google.android.exoplayer2")> CREATOR
Deprecated.
Object that can restore tracks from a Bundle.
-
public Tracks([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Tracks.Group](Tracks.Group.html "class in com.google.android.exoplayer2")> groups)
Deprecated.
Constructs an instance.
Parameters:groups - The groups of tracks.
-
public[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[Tracks.Group](Tracks.Group.html "class in com.google.android.exoplayer2")> getGroups()
Deprecated.
Returns the groups of tracks.
-
public boolean isEmpty()
Deprecated.
Returns true if there are no tracks, and false otherwise.
-
public boolean containsType(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.
Returns true if there are tracks of type trackType, and false otherwise.
-
public boolean isTypeSupported(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.
Returns true if at least one track of type trackType is supported.
-
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.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType)
Deprecated.
Use containsType(int) and isTypeSupported(int).
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public boolean isTypeSupportedOrEmpty(@com.google.android.exoplayer2.C.TrackType int trackType,
boolean allowExceedsCapabilities)
Deprecated.
Use containsType(int) and isTypeSupported(int, boolean).
-
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.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")other)
Deprecated.
Overrides:equals in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Deprecated.
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable