# LoadControl.Parameters

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

*** ** * ** ***


```
public final class LoadControl.Parameters
```

<br />

*** ** * ** ***

Information about the current playback context and the `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaPeriod` for which `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl` methods are called.

## Summary

| ### Public fields |
|---|---|
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#bufferedDurationUs()` The total duration of media that's currently buffered. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#lastRebufferRealtimeMs()` Sets the time at which the last rebuffering occurred, in milliseconds since boot including time spent in sleep. |
| `final https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#mediaPeriodId()` The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` of the affected `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaPeriod` in the current `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#timeline()`. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playWhenReady()` Whether playback should proceed when `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()`. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playbackPositionUs()` The current playback position in microseconds, relative to the start of the affected `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaPeriod` identified by `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#mediaPeriodId()`. |
| `final float` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playbackSpeed()` The current factor by which playback is sped up. |
| `final https://developer.android.com/reference/androidx/media3/exoplayer/analytics/PlayerId` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playerId()` The `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/PlayerId`. |
| `final boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#rebuffering()` Whether the player is rebuffering. |
| `final long` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#targetLiveOffsetUs()` The desired playback position offset to the live edge in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the media is not a live stream or no offset is configured. |
| `final https://developer.android.com/reference/androidx/media3/common/Timeline` | `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#timeline()` The current `https://developer.android.com/reference/androidx/media3/common/Timeline` of the player. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#Parameters(androidx.media3.exoplayer.analytics.PlayerId,androidx.media3.common.Timeline,androidx.media3.exoplayer.source.MediaSource.MediaPeriodId,long,long,float,boolean,boolean,long,long)( https://developer.android.com/reference/androidx/media3/exoplayer/analytics/PlayerId playerId, https://developer.android.com/reference/androidx/media3/common/Timeline timeline, https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId mediaPeriodId, long playbackPositionUs, long bufferedDurationUs, float playbackSpeed, boolean playWhenReady, boolean rebuffering, long targetLiveOffsetUs, long lastRebufferRealtimeMs )` Creates parameters for `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl` methods. |

## Public fields

### bufferedDurationUs

```
public final long bufferedDurationUs
```

The total duration of media that's currently buffered.

### lastRebufferRealtimeMs

```
public final long lastRebufferRealtimeMs
```

Sets the time at which the last rebuffering occurred, in milliseconds since boot including time spent in sleep.

The time base used is the same as that measured by `https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtime()`.

**Note:** If rebuffer events are not known when the load is started or continued, or if no rebuffering has occurred, or if there have been any user interactions such as seeking or stopping the player, the value will be set to `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()`.

### mediaPeriodId

```
public final MediaSource.MediaPeriodId mediaPeriodId
```

The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId` of the affected `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaPeriod` in the current `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#timeline()`.

### playWhenReady

```
public final boolean playWhenReady
```

Whether playback should proceed when `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()`.

### playbackPositionUs

```
public final long playbackPositionUs
```

The current playback position in microseconds, relative to the start of the affected `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaPeriod` identified by `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#mediaPeriodId()`. If playback of this period has not yet started, the value will be negative and equal in magnitude to the duration of any media in previous periods still to be played.

### playbackSpeed

```
public final float playbackSpeed
```

The current factor by which playback is sped up.

### playerId

```
public final PlayerId playerId
```

The `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/PlayerId`.

### rebuffering

```
public final boolean rebuffering
```

Whether the player is rebuffering. A rebuffer is defined to be caused by buffer depletion rather than a user action. Hence this parameter is false during initial buffering and when buffering as a result of a seek operation.

### targetLiveOffsetUs

```
public final long targetLiveOffsetUs
```

The desired playback position offset to the live edge in microseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the media is not a live stream or no offset is configured.

### timeline

```
public final Timeline timeline
```

The current `https://developer.android.com/reference/androidx/media3/common/Timeline` of the player.

## Public constructors

### Parameters

```
public Parameters(
    PlayerId playerId,
    Timeline timeline,
    MediaSource.MediaPeriodId mediaPeriodId,
    long playbackPositionUs,
    long bufferedDurationUs,
    float playbackSpeed,
    boolean playWhenReady,
    boolean rebuffering,
    long targetLiveOffsetUs,
    long lastRebufferRealtimeMs
)
```

Creates parameters for `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl` methods.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/PlayerId playerId` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playerId()`. |
| `https://developer.android.com/reference/androidx/media3/common/Timeline timeline` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#timeline()`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId mediaPeriodId` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#mediaPeriodId()`. |
| `long playbackPositionUs` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playbackPositionUs()`. |
| `long bufferedDurationUs` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#bufferedDurationUs()`. |
| `float playbackSpeed` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playbackSpeed()`. |
| `boolean playWhenReady` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#playWhenReady()`. |
| `boolean rebuffering` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#rebuffering()`. |
| `long targetLiveOffsetUs` | See `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#targetLiveOffsetUs()`. |
| `long lastRebufferRealtimeMs` | see `https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters#lastRebufferRealtimeMs()` |