LoadControl.Parameters


class LoadControl.Parameters


Information about the current playback context and the MediaPeriod for which methods are called.

Summary

Public constructors

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

Creates parameters for LoadControl methods.

Public properties

Long

The total duration of media that's currently buffered.

MediaSource.MediaPeriodId!

The MediaPeriodId of the affected MediaPeriod in the current timeline.

Boolean

Whether playback should proceed when STATE_READY.

Long

The current playback position in microseconds, relative to the start of the affected identified by mediaPeriodId.

Float

The current factor by which playback is sped up.

PlayerId!

The ID of the player.

Boolean

Whether the player is rebuffering.

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.

Timeline!

The current 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
)

Creates parameters for LoadControl methods.

Parameters
playerId: PlayerId!

See playerId.

timeline: Timeline!

See timeline.

mediaPeriodId: MediaSource.MediaPeriodId!

See mediaPeriodId.

playbackPositionUs: Long

See playbackPositionUs.

bufferedDurationUs: Long

See bufferedDurationUs.

playbackSpeed: Float

See playbackSpeed.

playWhenReady: Boolean

See playWhenReady.

rebuffering: Boolean

See rebuffering.

targetLiveOffsetUs: Long

See targetLiveOffsetUs.

Public properties

bufferedDurationUs

val bufferedDurationUsLong

The total duration of media that's currently buffered.

mediaPeriodId

val mediaPeriodIdMediaSource.MediaPeriodId!

The MediaPeriodId of the affected MediaPeriod in the current timeline.

playWhenReady

val playWhenReadyBoolean

Whether playback should proceed when STATE_READY.

playbackPositionUs

val playbackPositionUsLong

The current playback position in microseconds, relative to the start of the affected 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.

playbackSpeed

val playbackSpeedFloat

The current factor by which playback is sped up.

playerId

val playerIdPlayerId!

The ID of the player.

rebuffering

val rebufferingBoolean

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 targetLiveOffsetUsLong

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.

timeline

val timelineTimeline!

The current Timeline of the player.