# MediaItem.LiveConfiguration

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)

*** ** * ** ***


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

<br />

*** ** * ** ***

Live playback configuration.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` Builder for `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration` instances. |

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#UNSET()` A live playback configuration with unset values, meaning media-defined default values will be used. |

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#maxOffsetMs()` The maximum allowed offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default. |
| `final float` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#maxPlaybackSpeed()` Maximum factor by which playback can be sped up, or `https://developer.android.com/reference/androidx/media3/common/C#RATE_UNSET()` to use the media-defined default. |
| `final long` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#minOffsetMs()` The minimum allowed offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default. |
| `final float` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#minPlaybackSpeed()` Minimum factor by which playback can be sped up, or `https://developer.android.com/reference/androidx/media3/common/C#RATE_UNSET()` to use the media-defined default. |
| `final long` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#targetOffsetMs()` Target offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default. |

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi [LiveConfiguration](https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#LiveConfiguration(long,long,long,float,float))( long targetOffsetMs, long minOffsetMs, long maxOffsetMs, float minPlaybackSpeed, float maxPlaybackSpeed )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` instead. <br /> |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#buildUpon()()` Returns a `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` initialized with the values of this instance. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html obj)` |
| `static https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration` | `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#fromBundle(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle.html bundle)` Restores a `LiveConfiguration` from a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `int` | `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#hashCode()()` |
| `https://developer.android.com/reference/android/os/Bundle.html` | `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#toBundle()()` |

## Constants

### UNSET

```
public static final MediaItem.LiveConfiguration UNSET
```

A live playback configuration with unset values, meaning media-defined default values will be used.

## Public fields

### maxOffsetMs

```
public final long maxOffsetMs
```

The maximum allowed offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default.

### maxPlaybackSpeed

```
public final float maxPlaybackSpeed
```

Maximum factor by which playback can be sped up, or `https://developer.android.com/reference/androidx/media3/common/C#RATE_UNSET()` to use the media-defined default.

### minOffsetMs

```
public final long minOffsetMs
```

The minimum allowed offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default.

### minPlaybackSpeed

```
public final float minPlaybackSpeed
```

Minimum factor by which playback can be sped up, or `https://developer.android.com/reference/androidx/media3/common/C#RATE_UNSET()` to use the media-defined default.

### targetOffsetMs

```
public final long targetOffsetMs
```

Target offset from the live edge, in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to use the media-defined default.

## Public constructors

### LiveConfiguration

```
@UnstableApi
public [LiveConfiguration](https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration#LiveConfiguration(long,long,long,float,float))(
    long targetOffsetMs,
    long minOffsetMs,
    long maxOffsetMs,
    float minPlaybackSpeed,
    float maxPlaybackSpeed
)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` instead.

## Public methods

### buildUpon

```
public MediaItem.LiveConfiguration.Builder buildUpon()
```

Returns a `https://developer.android.com/reference/androidx/media3/common/MediaItem.LiveConfiguration.Builder` initialized with the values of this instance.

### equals

```
public boolean equals(@Nullable Object obj)
```

### fromBundle

```
@UnstableApi
public static MediaItem.LiveConfiguration fromBundle(Bundle bundle)
```

Restores a `LiveConfiguration` from a `https://developer.android.com/reference/android/os/Bundle.html`.

### hashCode

```
public int hashCode()
```

### toBundle

```
@UnstableApi
public Bundle toBundle()
```