LoadControl.Parameters
class LoadControl.Parameters
Information about the current playback context and the MediaPeriod for which LoadControl methods are called.
Summary
Public constructors |
|---|
Parameters(Creates parameters for |
Public properties |
|
|---|---|
Long |
The total duration of media that's currently buffered. |
Long |
Sets the time at which the last rebuffering occurred, in milliseconds since boot including time spent in sleep. |
MediaSource.MediaPeriodId! |
The |
Boolean |
Whether playback should proceed when |
Long |
The current playback position in microseconds, relative to the start of the affected |
Float |
The current factor by which playback is sped up. |
PlayerId! |
The |
Boolean |
Whether the player is rebuffering. |
Long |
The desired playback position offset to the live edge in microseconds, or |
Timeline! |
The current |
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 methods.
| Parameters | |
|---|---|
playerId: PlayerId! |
See |
timeline: Timeline! |
See |
mediaPeriodId: MediaSource.MediaPeriodId! |
See |
playbackPositionUs: Long |
See |
bufferedDurationUs: Long |
See |
playbackSpeed: Float |
See |
playWhenReady: Boolean |
See |
rebuffering: Boolean |
See |
targetLiveOffsetUs: Long |
See |
lastRebufferRealtimeMs: Long |
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.
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.
mediaPeriodId
val mediaPeriodId: MediaSource.MediaPeriodId!
The MediaPeriodId of the affected MediaPeriod in the current timeline.
playbackPositionUs
val playbackPositionUs: Long
The current playback position in microseconds, relative to the start of the affected MediaPeriod identified by 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.
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 if the media is not a live stream or no offset is configured.