# LoadControl.Parameters

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/exoplayer/LoadControl.Parameters "View this page in Java")

<br />

```
class LoadControl.Parameters
```

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Parameters](https://developer.android.com/reference/kotlin/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))`(` ` playerId: `[PlayerId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/analytics/PlayerId)`!,` ` timeline: `[Timeline](https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline)`!,` ` mediaPeriodId: `[MediaSource.MediaPeriodId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId)`!,` ` playbackPositionUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` bufferedDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` playbackSpeed: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`,` ` playWhenReady: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`,` ` rebuffering: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`,` ` targetLiveOffsetUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`,` ` lastRebufferRealtimeMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Creates parameters for[LoadControl](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl)methods. |

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

## Public constructors

### Parameters

```
Parameters(
    playerId: PlayerId!,
    timeline: Timeline!,
    mediaPeriodId: MediaSource.MediaPeriodId!,
    playbackPositionUs: Long,
    bufferedDurationUs: Long,
    playbackSpeed: Float,
    playWhenReady: Boolean,
    rebuffering: Boolean,
    targetLiveOffsetUs: Long,
    lastRebufferRealtimeMs: Long
)
```

Creates parameters for[LoadControl](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl)methods.  

|                                                                         Parameters                                                                         |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
| `playerId: `[PlayerId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/analytics/PlayerId)`!`                                     | See[playerId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#playerId()).                            |
| `timeline: `[Timeline](https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline)`!`                                                  | See[timeline](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#timeline()).                            |
| `mediaPeriodId: `[MediaSource.MediaPeriodId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaSource.MediaPeriodId)`!` | See[mediaPeriodId](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#mediaPeriodId()).                  |
| `playbackPositionUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                        | See[playbackPositionUs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#playbackPositionUs()).        |
| `bufferedDurationUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                        | See[bufferedDurationUs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#bufferedDurationUs()).        |
| `playbackSpeed: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                           | See[playbackSpeed](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#playbackSpeed()).                  |
| `playWhenReady: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                       | See[playWhenReady](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#playWhenReady()).                  |
| `rebuffering: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                         | See[rebuffering](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#rebuffering()).                      |
| `targetLiveOffsetUs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                        | See[targetLiveOffsetUs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#targetLiveOffsetUs()).        |
| `lastRebufferRealtimeMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                                                    | see[lastRebufferRealtimeMs](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/LoadControl.Parameters#lastRebufferRealtimeMs()) |

## Public properties

### bufferedDurationUs

```
val bufferedDurationUs: Long
```

The total duration of media that's currently buffered.  

### lastRebufferRealtimeMs

```
val lastRebufferRealtimeMs: Long
```

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[elapsedRealtime](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[TIME_UNSET](https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()).  

### mediaPeriodId

```
val mediaPeriodId: MediaSource.MediaPeriodId!
```

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

### playWhenReady

```
val playWhenReady: Boolean
```

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

### playbackPositionUs

```
val playbackPositionUs: Long
```

The current playback position in microseconds, relative to the start of the affected[MediaPeriod](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/MediaPeriod)identified by[mediaPeriodId](https://developer.android.com/reference/kotlin/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

```
val playbackSpeed: Float
```

The current factor by which playback is sped up.  

### playerId

```
val playerId: PlayerId!
```

The[ID of the player](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/analytics/PlayerId).  

### rebuffering

```
val rebuffering: Boolean
```

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

```
val targetLiveOffsetUs: Long
```

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

### timeline

```
val timeline: Timeline!
```

The current[Timeline](https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline)of the player.