# AlternativeMpdEvent.Builder

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

*** ** * ** ***


```
class AlternativeMpdEvent.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#Builder(int,long,android.net.Uri)(@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Type type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, uri: https://developer.android.com/reference/android/net/Uri.html!)` Creates a builder with spec default values for optional fields. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent!` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setClip(boolean)(clip: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the replacement `@clip` value. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setDurationUs(long)(durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the duration of the active interval in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if active until the end of the period. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setEarliestResolutionTimeOffsetUs(long)(earliestResolutionTimeOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the earliest resolution time offset in microseconds before `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#presentationTimeUs()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setEventStreamValue(java.lang.String)(eventStreamValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Sets the `EventStream@value`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setExecuteOnce(boolean)(executeOnce: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets `@executeOnce`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setId(long)(id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `Event@id`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setIsUpdate(boolean)(isUpdate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether `Event@status` is `"update"`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setMaxDurationUs(long)(maxDurationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the maximum alternative presentation duration (APDmax) in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unbounded. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setNoJump(int)(@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.NoJumpMode noJump: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the `@noJump` mode. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setPresentationTimeUs(long)(presentationTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the presentation time (PRT) in microseconds, relative to the start of the period. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setReturnOffsetUs(long)(returnOffsetUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the replacement `@returnOffset` in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if absent. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setServiceDescriptionId(java.lang.String)(serviceDescriptionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets the `@serviceDescriptionId`, or `null` if absent. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setSkipAfterUs(long)(skipAfterUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `@skipAfter` offset in microseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setStartWithOffset(boolean)(startWithOffset: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets the replacement `@startWithOffset` value. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setSupplementalProperties(java.util.List<androidx.media3.exoplayer.dash.manifest.Descriptor>)( supplementalProperties: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/Descriptor!>! )` Sets the `SupplementalProperty` descriptors. |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#setUri(android.net.Uri)(uri: https://developer.android.com/reference/android/net/Uri.html!)` Sets the resolved URI of the alternative MPD. |

## Public constructors

### Builder

```
Builder(@AlternativeMpdEvent.Type type: Int, id: Long, uri: Uri!)
```

Creates a builder with spec default values for optional fields.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Type type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Type` of the event. |
| `id: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The `Event@id`. |
| `uri: https://developer.android.com/reference/android/net/Uri.html!` | The resolved URI of the alternative MPD. |

## Public functions

### build

```
fun build(): AlternativeMpdEvent!
```

Builds the `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent`.

### setClip

```
@CanIgnoreReturnValue
fun setClip(clip: Boolean): AlternativeMpdEvent.Builder!
```

Sets the replacement `@clip` value. Ignored for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#TYPE_INSERT()` events, where `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#clip()` is always `true`. Defaults to `true`.

### setDurationUs

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

Sets the duration of the active interval in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if active until the end of the period. Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`.

### setEarliestResolutionTimeOffsetUs

```
@CanIgnoreReturnValue
fun setEarliestResolutionTimeOffsetUs(earliestResolutionTimeOffsetUs: Long): AlternativeMpdEvent.Builder!
```

Sets the earliest resolution time offset in microseconds before `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#presentationTimeUs()`. Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#DEFAULT_EARLIEST_RESOLUTION_TIME_OFFSET_US()`.

### setEventStreamValue

```
@CanIgnoreReturnValue
fun setEventStreamValue(eventStreamValue: String!): AlternativeMpdEvent.Builder!
```

Sets the `EventStream@value`. Defaults to the empty string.

### setExecuteOnce

```
@CanIgnoreReturnValue
fun setExecuteOnce(executeOnce: Boolean): AlternativeMpdEvent.Builder!
```

Sets `@executeOnce`. Defaults to `false`.

### setId

```
@CanIgnoreReturnValue
fun setId(id: Long): AlternativeMpdEvent.Builder!
```

Sets the `Event@id`.

### setIsUpdate

```
@CanIgnoreReturnValue
fun setIsUpdate(isUpdate: Boolean): AlternativeMpdEvent.Builder!
```

Sets whether `Event@status` is `"update"`. Ignored for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#TYPE_INSERT()` events, where `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#isUpdate()` is always `false`.

### setMaxDurationUs

```
@CanIgnoreReturnValue
fun setMaxDurationUs(maxDurationUs: Long): AlternativeMpdEvent.Builder!
```

Sets the maximum alternative presentation duration (APDmax) in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if unbounded. Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`.

### setNoJump

```
@CanIgnoreReturnValue
fun setNoJump(@AlternativeMpdEvent.NoJumpMode noJump: Int): AlternativeMpdEvent.Builder!
```

Sets the `@noJump` mode. Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#NO_JUMP_NONE()`.

### setPresentationTimeUs

```
@CanIgnoreReturnValue
fun setPresentationTimeUs(presentationTimeUs: Long): AlternativeMpdEvent.Builder!
```

Sets the presentation time (PRT) in microseconds, relative to the start of the period.

### setReturnOffsetUs

```
@CanIgnoreReturnValue
fun setReturnOffsetUs(returnOffsetUs: Long): AlternativeMpdEvent.Builder!
```

Sets the replacement `@returnOffset` in microseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` if absent. Ignored for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#TYPE_INSERT()` events, where `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#returnOffsetUs()` is always `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`.

### setServiceDescriptionId

```
@CanIgnoreReturnValue
fun setServiceDescriptionId(serviceDescriptionId: String?): AlternativeMpdEvent.Builder!
```

Sets the `@serviceDescriptionId`, or `null` if absent.

### setSkipAfterUs

```
@CanIgnoreReturnValue
fun setSkipAfterUs(skipAfterUs: Long): AlternativeMpdEvent.Builder!
```

Sets the `@skipAfter` offset in microseconds. Defaults to `0`.

### setStartWithOffset

```
@CanIgnoreReturnValue
fun setStartWithOffset(startWithOffset: Boolean): AlternativeMpdEvent.Builder!
```

Sets the replacement `@startWithOffset` value. Ignored for `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent#TYPE_INSERT()` events, where `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/dash/manifest/AlternativeMpdEvent.Builder#startWithOffset()` is always `false`. Defaults to `false`.

### setSupplementalProperties

```
@CanIgnoreReturnValue
fun setSupplementalProperties(
    supplementalProperties: (Mutable)List<Descriptor!>!
): AlternativeMpdEvent.Builder!
```

Sets the `SupplementalProperty` descriptors. Defaults to an empty list.

### setUri

```
@CanIgnoreReturnValue
fun setUri(uri: Uri!): AlternativeMpdEvent.Builder!
```

Sets the resolved URI of the alternative MPD.