> Documentation index: https://developer.android.com/reference/llms.txt

# AlternativeMpdEvent.Builder

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

*** ** * ** ***


```
public final class AlternativeMpdEvent.Builder
```

<br />

*** ** * ** ***

A builder for `AlternativeMpdEvent` instances.

## Summary

| ### Public constructors |
|---|
| `Builder(@AlternativeMpdEvent.Type int type, long id, Uri uri)` Creates a builder with spec default values for optional fields. |

| ### Public methods |
|---|---|
| `AlternativeMpdEvent` | `build()` Builds the `AlternativeMpdEvent`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setClip(boolean clip)` Sets the replacement `@clip` value. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setDurationUs(long durationUs)` Sets the duration of the active interval in microseconds, or `TIME_UNSET` if active until the end of the period. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setEarliestResolutionTimeOffsetUs(long earliestResolutionTimeOffsetUs)` Sets the earliest resolution time offset in microseconds before `presentationTimeUs`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setEventStreamValue(String eventStreamValue)` Sets the `EventStream@value`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setExecuteOnce(boolean executeOnce)` Sets `@executeOnce`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setId(long id)` Sets the `Event@id`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setIsUpdate(boolean isUpdate)` Sets whether `Event@status` is `"update"`. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setMaxDurationUs(long maxDurationUs)` Sets the maximum alternative presentation duration (APDmax) in microseconds, or `TIME_UNSET` if unbounded. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setNoJump(@AlternativeMpdEvent.NoJumpMode int noJump)` Sets the `@noJump` mode. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setPresentationTimeUs(long presentationTimeUs)` Sets the presentation time (PRT) in microseconds, relative to the start of the period. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setReturnOffsetUs(long returnOffsetUs)` Sets the replacement `@returnOffset` in microseconds, or `TIME_UNSET` if absent. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setServiceDescriptionId(@Nullable String serviceDescriptionId)` Sets the `@serviceDescriptionId`, or `null` if absent. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setSkipAfterUs(long skipAfterUs)` Sets the `@skipAfter` offset in microseconds. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setStartWithOffset(boolean startWithOffset)` Sets the replacement `@startWithOffset` value. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setSupplementalProperties(List<Descriptor> supplementalProperties)` Sets the `SupplementalProperty` descriptors. |
| `AlternativeMpdEvent.Builder` | `@CanIgnoreReturnValue setUri(Uri uri)` Sets the resolved URI of the alternative MPD. |

## Public constructors

### Builder

```
public Builder(@AlternativeMpdEvent.Type int type, long id, Uri uri)
```

Creates a builder with spec default values for optional fields.

| Parameters |
|---|---|
| `@AlternativeMpdEvent.Type int type` | The `Type` of the event. |
| `long id` | The `Event@id`. |
| `Uri uri` | The resolved URI of the alternative MPD. |

## Public methods

### build

```
public AlternativeMpdEvent build()
```

Builds the `AlternativeMpdEvent`.

### setClip

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setClip(boolean clip)
```

Sets the replacement `@clip` value. Ignored for `TYPE_INSERT` events, where `clip` is always `true`. Defaults to `true`.

### setDurationUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setDurationUs(long durationUs)
```

Sets the duration of the active interval in microseconds, or `TIME_UNSET` if active until the end of the period. Defaults to `TIME_UNSET`.

### setEarliestResolutionTimeOffsetUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setEarliestResolutionTimeOffsetUs(long earliestResolutionTimeOffsetUs)
```

Sets the earliest resolution time offset in microseconds before `presentationTimeUs`. Defaults to `DEFAULT_EARLIEST_RESOLUTION_TIME_OFFSET_US`.

### setEventStreamValue

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setEventStreamValue(String eventStreamValue)
```

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

### setExecuteOnce

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setExecuteOnce(boolean executeOnce)
```

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

### setId

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setId(long id)
```

Sets the `Event@id`.

### setIsUpdate

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setIsUpdate(boolean isUpdate)
```

Sets whether `Event@status` is `"update"`. Ignored for `TYPE_INSERT` events, where `isUpdate` is always `false`.

### setMaxDurationUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setMaxDurationUs(long maxDurationUs)
```

Sets the maximum alternative presentation duration (APDmax) in microseconds, or `TIME_UNSET` if unbounded. Defaults to `TIME_UNSET`.

### setNoJump

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setNoJump(@AlternativeMpdEvent.NoJumpMode int noJump)
```

Sets the `@noJump` mode. Defaults to `NO_JUMP_NONE`.

### setPresentationTimeUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setPresentationTimeUs(long presentationTimeUs)
```

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

### setReturnOffsetUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setReturnOffsetUs(long returnOffsetUs)
```

Sets the replacement `@returnOffset` in microseconds, or `TIME_UNSET` if absent. Ignored for `TYPE_INSERT` events, where `returnOffsetUs` is always `TIME_UNSET`.

### setServiceDescriptionId

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setServiceDescriptionId(@Nullable String serviceDescriptionId)
```

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

### setSkipAfterUs

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setSkipAfterUs(long skipAfterUs)
```

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

### setStartWithOffset

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setStartWithOffset(boolean startWithOffset)
```

Sets the replacement `@startWithOffset` value. Ignored for `TYPE_INSERT` events, where `startWithOffset` is always `false`. Defaults to `false`.

### setSupplementalProperties

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setSupplementalProperties(List<Descriptor> supplementalProperties)
```

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

### setUri

```
@CanIgnoreReturnValue
public AlternativeMpdEvent.Builder setUri(Uri uri)
```

Sets the resolved URI of the alternative MPD.