# SimpleBasePlayer.PeriodData.Builder

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/SimpleBasePlayer.java+class:androidx.media3.common.SimpleBasePlayer.PeriodData.Builder)

*** ** * ** ***


```
class SimpleBasePlayer.PeriodData.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#Builder(java.lang.Object)(uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` Creates the builder. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#setAdPlaybackState(androidx.media3.common.AdPlaybackState)(adPlaybackState: https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#setDurationUs(long)(durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the total duration of the period, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#setIsPlaceholder(boolean)(isPlaceholder: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether this period contains placeholder information because the real information has yet to be loaded |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#setOriginalDurationUs(long)(originalDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the original duration of the period before any modification of its end, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder#setUid(java.lang.Object)(uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` Sets the unique identifier of the period within its media item. |

## Public constructors

### Builder

```
Builder(uid: Any!)
```

Creates the builder.

| Parameters |
|---|---|
| `uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` | The unique identifier of the period within its media item. |

## Public functions

### build

```
fun build(): SimpleBasePlayer.PeriodData!
```

Builds the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData`.

### setAdPlaybackState

```
@CanIgnoreReturnValue
fun setAdPlaybackState(adPlaybackState: AdPlaybackState!): SimpleBasePlayer.PeriodData.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState`.

| Parameters |
|---|---|
| `adPlaybackState: https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState`, or `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState#NONE()` if there are no ads. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | This builder. |

### setDurationUs

```
@CanIgnoreReturnValue
fun setDurationUs(durationUs: Long): SimpleBasePlayer.PeriodData.Builder!
```

Sets the total duration of the period, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown.

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

| Parameters |
|---|---|
| `durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The total duration of the period, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | This builder. |

### setIsPlaceholder

```
@CanIgnoreReturnValue
fun setIsPlaceholder(isPlaceholder: Boolean): SimpleBasePlayer.PeriodData.Builder!
```

Sets whether this period contains placeholder information because the real information has yet to be loaded

| Parameters |
|---|---|
| `isPlaceholder: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether this period contains placeholder information because the real information has yet to be loaded. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | This builder. |

### setOriginalDurationUs

```
@CanIgnoreReturnValue
fun setOriginalDurationUs(originalDurationUs: Long): SimpleBasePlayer.PeriodData.Builder!
```

Sets the original duration of the period before any modification of its end, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown.

| Parameters |
|---|---|
| `originalDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The original duration of the period before any modification of its end, in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unknown. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | This builder. |

### setUid

```
@CanIgnoreReturnValue
fun setUid(uid: Any!): SimpleBasePlayer.PeriodData.Builder!
```

Sets the unique identifier of the period within its media item.

| Parameters |
|---|---|
| `uid: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!` | The unique identifier of the period within its media item. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PeriodData.Builder!` | This builder. |