docs/doc/reference/com/google/android/exoplayer2/source/MediaPeriodId.html
Package com.google.android.exoplayer2.source
Direct Known Subclasses:MediaSource.MediaPeriodId
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classMediaPeriodIdextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Identifies a specific playback of a Timeline.Period.
A Timeline.Period can be played multiple times, for example if it is repeated. Each instances of this class identifies a specific playback of a Timeline.Period.
In ExoPlayer's implementation, MediaPeriodId identifies a MediaPeriod.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | adGroupIndex |
Deprecated.
If the media period is in an ad group, the index of the ad group in the period.
|
| int | adIndexInAdGroup |
Deprecated.
If the media period is in an ad group, the index of the ad in its ad group in the period.
|
| int | nextAdGroupIndex |
Deprecated.
The index of the next ad group to which the media period's content is clipped, or C.INDEX_UNSET if there is no following ad group or if this media period is an ad.
|
| Object | periodUid |
Deprecated.
The unique id of the timeline period.
|
| long | windowSequenceNumber |
Deprecated.
The sequence number of the window in the buffered sequence of windows this media period is part of. |
Constructors | Modifier | Constructor | Description |
| --- | --- | --- |
| protected | MediaPeriodId(MediaPeriodId mediaPeriodId) |
Deprecated.
Copy constructor for inheritance.
|
| | MediaPeriodId(Object periodUid) |
Deprecated.
Creates a media period identifier for a period which is not part of a buffered sequence of windows.
|
| | MediaPeriodId(Object periodUid, int adGroupIndex, int adIndexInAdGroup, long windowSequenceNumber) |
Deprecated.
Creates a media period identifier that identifies an ad within an ad group at the specified timeline period.
|
| | MediaPeriodId(Object periodUid, long windowSequenceNumber) |
Deprecated.
Creates a media period identifier for the specified period in the timeline.
|
| | MediaPeriodId(Object periodUid, long windowSequenceNumber, int nextAdGroupIndex) |
Deprecated.
Creates a media period identifier for the specified clipped period in the timeline. |
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| MediaPeriodId | copyWithPeriodUid(Object newPeriodUid) |
Deprecated.
Returns a copy of this period identifier but with newPeriodUid as its period uid.
|
| MediaPeriodId | copyWithWindowSequenceNumber(long windowSequenceNumber) |
Deprecated.
Returns a copy of this period identifier with a new windowSequenceNumber.
|
| boolean | equals(Object obj) |
Deprecated.
|
| int | hashCode() |
Deprecated.
|
| boolean | isAd() |
Deprecated.
Returns whether this period identifier identifies an ad in an ad group in a period. |
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public final[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")periodUid
Deprecated.
The unique id of the timeline period.
-
public final int adGroupIndex
Deprecated.
If the media period is in an ad group, the index of the ad group in the period. C.INDEX_UNSET otherwise.
-
public final int adIndexInAdGroup
Deprecated.
If the media period is in an ad group, the index of the ad in its ad group in the period. C.INDEX_UNSET otherwise.
-
public final long windowSequenceNumber
Deprecated.
The sequence number of the window in the buffered sequence of windows this media period is part of. C.INDEX_UNSET if the media period id is not part of a buffered sequence of windows.
-
public final int nextAdGroupIndex
Deprecated.
The index of the next ad group to which the media period's content is clipped, or C.INDEX_UNSET if there is no following ad group or if this media period is an ad.
-
public MediaPeriodId([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")periodUid)
Deprecated.
Creates a media period identifier for a period which is not part of a buffered sequence of windows.
Parameters:periodUid - The unique id of the timeline period.
-
public MediaPeriodId([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")periodUid,
long windowSequenceNumber)
Deprecated.
Creates a media period identifier for the specified period in the timeline.
Parameters:periodUid - The unique id of the timeline period.windowSequenceNumber - The sequence number of the window in the buffered sequence of windows this media period is part of.
-
public MediaPeriodId([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")periodUid,
long windowSequenceNumber,
int nextAdGroupIndex)
Deprecated.
Creates a media period identifier for the specified clipped period in the timeline.
Parameters:periodUid - The unique id of the timeline period.windowSequenceNumber - The sequence number of the window in the buffered sequence of windows this media period is part of.nextAdGroupIndex - The index of the next ad group to which the media period's content is clipped.
-
public MediaPeriodId([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")periodUid,
int adGroupIndex,
int adIndexInAdGroup,
long windowSequenceNumber)
Deprecated.
Creates a media period identifier that identifies an ad within an ad group at the specified timeline period.
Parameters:periodUid - The unique id of the timeline period that contains the ad group.adGroupIndex - The index of the ad group.adIndexInAdGroup - The index of the ad in the ad group.windowSequenceNumber - The sequence number of the window in the buffered sequence of windows this media period is part of.
-
protected MediaPeriodId([MediaPeriodId](MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId)
Deprecated.
Copy constructor for inheritance.
-
public[MediaPeriodId](MediaPeriodId.html "class in com.google.android.exoplayer2.source")copyWithPeriodUid([Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")newPeriodUid)
Deprecated.
Returns a copy of this period identifier but with newPeriodUid as its period uid.
-
public[MediaPeriodId](MediaPeriodId.html "class in com.google.android.exoplayer2.source")copyWithWindowSequenceNumber(long windowSequenceNumber)
Deprecated.
Returns a copy of this period identifier with a new windowSequenceNumber.
-
public boolean isAd()
Deprecated.
Returns whether this period identifier identifies an ad in an ad group in a period.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)
Deprecated.
Overrides:equals in class Object
-
public int hashCode()
Deprecated.
Overrides:hashCode in class Object