# MediaItem.LiveConfiguration.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/MediaItem.java+class:androidx.media3.common.MediaItem.LiveConfiguration.Builder)

*** ** * ** ***


```
class MediaItem.LiveConfiguration.Builder
```

<br />

*** ** * ** ***

Builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration` instances.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#Builder()()` Creates a new instance with default values. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#build()()` Creates a `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration` with the values from this builder. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#setMaxOffsetMs(long)(maxOffsetMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the maximum allowed live offset, in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#setMaxPlaybackSpeed(float)(maxPlaybackSpeed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the maximum playback speed. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#setMinOffsetMs(long)(minOffsetMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the minimum allowed live offset, in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#setMinPlaybackSpeed(float)(minPlaybackSpeed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` Sets the minimum playback speed. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration.Builder#setTargetOffsetMs(long)(targetOffsetMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the target live offset, in milliseconds. |

## Public constructors

### Builder

```
Builder()
```

Creates a new instance with default values.

## Public functions

### build

```
fun build(): MediaItem.LiveConfiguration!
```

Creates a `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem.LiveConfiguration` with the values from this builder.

### setMaxOffsetMs

```
@CanIgnoreReturnValue
fun setMaxOffsetMs(maxOffsetMs: Long): MediaItem.LiveConfiguration.Builder!
```

Sets the maximum allowed live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`, indicating the media-defined default will be used.

### setMaxPlaybackSpeed

```
@CanIgnoreReturnValue
fun setMaxPlaybackSpeed(maxPlaybackSpeed: Float): MediaItem.LiveConfiguration.Builder!
```

Sets the maximum playback speed.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RATE_UNSET()`, indicating the media-defined default will be used.

### setMinOffsetMs

```
@CanIgnoreReturnValue
fun setMinOffsetMs(minOffsetMs: Long): MediaItem.LiveConfiguration.Builder!
```

Sets the minimum allowed live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`, indicating the media-defined default will be used.

### setMinPlaybackSpeed

```
@CanIgnoreReturnValue
fun setMinPlaybackSpeed(minPlaybackSpeed: Float): MediaItem.LiveConfiguration.Builder!
```

Sets the minimum playback speed.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#RATE_UNSET()`, indicating the media-defined default will be used.

### setTargetOffsetMs

```
@CanIgnoreReturnValue
fun setTargetOffsetMs(targetOffsetMs: Long): MediaItem.LiveConfiguration.Builder!
```

Sets the target live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

Defaults to `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()`, indicating the media-defined default will be used.