Package com.google.android.exoplayer2.source

## Class MediaSource.MediaPeriodId

- java.lang.Object
- - com.google.android.exoplayer2.source.MediaPeriodId
  - - com.google.android.exoplayer2.source.MediaSource.MediaPeriodId

- Enclosing interface:
    MediaSource

      public static final class MediaSource.MediaPeriodId
      extends MediaPeriodId

  Identifier for a `MediaPeriod`.

  Extends for backward-compatibility `MediaPeriodId`.

- - ### Field Summary

    - ### Fields inherited from class com.google.android.exoplayer2.source.MediaPeriodId

      `adGroupIndex, adIndexInAdGroup, nextAdGroupIndex, periodUid, windowSequenceNumber`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MediaPeriodId​(MediaPeriodId mediaPeriodId)` | Wraps an `MediaPeriodId` into a MediaPeriodId.
    `MediaPeriodId​(Object periodUid)` | See `MediaPeriodId(Object)`.
    `MediaPeriodId​(Object periodUid, int adGroupIndex, int adIndexInAdGroup, long windowSequenceNumber)` | See `MediaPeriodId(Object, int, int, long)`.
    `MediaPeriodId​(Object periodUid, long windowSequenceNumber)` | See `MediaPeriodId(Object, long)`.
    `MediaPeriodId​(Object periodUid, long windowSequenceNumber, int nextAdGroupIndex)` | See `MediaPeriodId(Object, long, int)`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MediaSource.MediaPeriodId` | `copyWithPeriodUid​(Object newPeriodUid)` | See `MediaPeriodId.copyWithPeriodUid(Object)`.
    `MediaSource.MediaPeriodId` | `copyWithWindowSequenceNumber​(long windowSequenceNumber)` | See `MediaPeriodId.copyWithWindowSequenceNumber(long)`.

    - ### Methods inherited from class com.google.android.exoplayer2.source.MediaPeriodId

      `equals, hashCode, isAd`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MediaPeriodId

          public MediaPeriodId​(Object periodUid)

      See `MediaPeriodId(Object)`.

    - #### MediaPeriodId

          public MediaPeriodId​(Object periodUid,
                               long windowSequenceNumber)

      See `MediaPeriodId(Object, long)`.

    - #### MediaPeriodId

          public MediaPeriodId​(Object periodUid,
                               long windowSequenceNumber,
                               int nextAdGroupIndex)

      See `MediaPeriodId(Object, long, int)`.

    - #### MediaPeriodId

          public MediaPeriodId​(Object periodUid,
                               int adGroupIndex,
                               int adIndexInAdGroup,
                               long windowSequenceNumber)

      See `MediaPeriodId(Object, int, int, long)`.

    - #### MediaPeriodId

          public MediaPeriodId​(MediaPeriodId mediaPeriodId)

      Wraps an `MediaPeriodId` into a MediaPeriodId.

  - ### Method Detail

    - #### copyWithPeriodUid

          public MediaSource.MediaPeriodId copyWithPeriodUid​(Object newPeriodUid)

      See `MediaPeriodId.copyWithPeriodUid(Object)`.
      Overrides:
        `copyWithPeriodUid` in class `MediaPeriodId`

    - #### copyWithWindowSequenceNumber

          public MediaSource.MediaPeriodId copyWithWindowSequenceNumber​(long windowSequenceNumber)

      See `MediaPeriodId.copyWithWindowSequenceNumber(long)`.
      Overrides:
        `copyWithWindowSequenceNumber` in class `MediaPeriodId`