# 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)

*** ** * ** ***


```
public final class MediaItem.LiveConfiguration.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

```
public Builder()
```

Creates a new instance with default values.

## Public methods

### build

```
public MediaItem.LiveConfiguration build()
```

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

### setMaxOffsetMs

```
@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMaxOffsetMs(long maxOffsetMs)
```

Sets the maximum allowed live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

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

### setMaxPlaybackSpeed

```
@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMaxPlaybackSpeed(float maxPlaybackSpeed)
```

Sets the maximum playback speed.

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

### setMinOffsetMs

```
@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMinOffsetMs(long minOffsetMs)
```

Sets the minimum allowed live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

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

### setMinPlaybackSpeed

```
@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setMinPlaybackSpeed(float minPlaybackSpeed)
```

Sets the minimum playback speed.

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

### setTargetOffsetMs

```
@CanIgnoreReturnValue
public MediaItem.LiveConfiguration.Builder setTargetOffsetMs(long targetOffsetMs)
```

Sets the target live offset, in milliseconds.

See `Player#getCurrentLiveOffset()`.

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