Package com.google.android.exoplayer2

## Class SimpleBasePlayer.PeriodData.Builder

- java.lang.Object
- - com.google.android.exoplayer2.SimpleBasePlayer.PeriodData.Builder

- Enclosing class:
    SimpleBasePlayer.PeriodData

      public static final class SimpleBasePlayer.PeriodData.Builder
      extends Object

  A builder for `SimpleBasePlayer.PeriodData` objects.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Builder​(Object uid)` | Creates the builder.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SimpleBasePlayer.PeriodData` | `build()` | Builds the `SimpleBasePlayer.PeriodData`.
    `SimpleBasePlayer.PeriodData.Builder` | `setAdPlaybackState​(AdPlaybackState adPlaybackState)` | Sets the `AdPlaybackState`.
    `SimpleBasePlayer.PeriodData.Builder` | `setDurationUs​(long durationUs)` | Sets the total duration of the period, in microseconds, or `C.TIME_UNSET` if unknown.
    `SimpleBasePlayer.PeriodData.Builder` | `setIsPlaceholder​(boolean isPlaceholder)` | Sets whether this period contains placeholder information because the real information has yet to be loaded
    `SimpleBasePlayer.PeriodData.Builder` | `setUid​(Object uid)` | Sets the unique identifier of the period within its media item.

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

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

- - ### Constructor Detail

    - #### Builder

          public Builder​(Object uid)

      Creates the builder.
      Parameters:
        `uid` - The unique identifier of the period within its media item.

  - ### Method Detail

    - #### setUid

          @CanIgnoreReturnValue
          public SimpleBasePlayer.PeriodData.Builder setUid​(Object uid)

      Sets the unique identifier of the period within its media item.
      Parameters:
        `uid` - The unique identifier of the period within its media item.
      Returns:
        This builder.

    - #### setDurationUs

          @CanIgnoreReturnValue
          public SimpleBasePlayer.PeriodData.Builder setDurationUs​(long durationUs)

      Sets the total duration of the period, in microseconds, or `C.TIME_UNSET` if unknown.

      Only the last period in a media item can have an unknown duration.

      Parameters:
        `durationUs` - The total duration of the period, in microseconds, or `C.TIME_UNSET` if unknown.
      Returns:
        This builder.

    - #### setAdPlaybackState

          @CanIgnoreReturnValue
          public SimpleBasePlayer.PeriodData.Builder setAdPlaybackState​(AdPlaybackState adPlaybackState)

      Sets the `AdPlaybackState`.
      Parameters:
        `adPlaybackState` - The `AdPlaybackState`, or `AdPlaybackState.NONE` if there are no ads.
      Returns:
        This builder.

    - #### setIsPlaceholder

          @CanIgnoreReturnValue
          public SimpleBasePlayer.PeriodData.Builder setIsPlaceholder​(boolean isPlaceholder)

      Sets whether this period contains placeholder information because the real information has yet to be loaded
      Parameters:
        `isPlaceholder` - Whether this period contains placeholder information because the real information has yet to be loaded.
      Returns:
        This builder.

    - #### build

          public SimpleBasePlayer.PeriodData build()

      Builds the `SimpleBasePlayer.PeriodData`.