SimpleBasePlayer.State


protected class SimpleBasePlayer.State


An immutable state description of the player.

Summary

Nested types

A builder for State objects.

Public functions

SimpleBasePlayer.State.Builder!

Returns a Builder pre-populated with the current state values.

Boolean
equals(o: Any?)
ImmutableList<SimpleBasePlayer.MediaItemData!>!

Returns the list of MediaItemData for the current playlist.

Int

Public properties

SimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated position up to which the currently playing ad is buffered, in milliseconds.

SimpleBasePlayer.PositionSupplier!

The PositionSupplier for the current ad playback position in milliseconds.

AudioAttributes!

The current AudioAttributes.

Player.Commands!

The available Commands.

SimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated position up to which the currently playing content is buffered, in milliseconds, or TIME_UNSET to indicate the default start position.

SimpleBasePlayer.PositionSupplier!

The PositionSupplier for the current content playback position in milliseconds, or TIME_UNSET to indicate the default start position.

Int

The current ad group index, or INDEX_UNSET if no ad is playing.

Int

The current ad index in the ad group, or INDEX_UNSET if no ad is playing.

CueGroup!

The current cues.

Int

The current media item index, or INDEX_UNSET to assume the default first item of the playlist is played.

MediaMetadata!

The current combined MediaMetadata.

Tracks!

The current Tracks.

DeviceInfo!

The DeviceInfo.

@IntRange(from = 0) Int

The current device volume.

Long

The position, in milliseconds, in the current content or ad from which playback continued after the discontinuity.

Boolean

Signals that a position discontinuity happened since the last update to the player.

Boolean

Whether the device is muted.

Boolean

Whether the player is currently loading its source.

Long

The maximum position for which seekToPrevious seeks to the previous item, in milliseconds.

Boolean

Whether a frame has been rendered for the first time since setting the surface, a rendering reset, or since the stream being rendered was changed.

Boolean

Whether playback should proceed when ready and not suppressed.

Int

The last reason for changing playWhenReady.

PlaybackParameters!

The currently active PlaybackParameters.

Int

The state of the player.

Int

The reason why playback is suppressed even if getPlayWhenReady is true.

PlaybackException?

The last error that caused playback to fail, or null if there was no error.

MediaMetadata!

The playlist MediaMetadata.

Int

The reason for the last position discontinuity.

Int

The RepeatMode used for playback.

Long

The seekBack increment in milliseconds.

Long

The seekForward increment in milliseconds.

Boolean

Whether shuffling of media items is enabled.

Size!

The size of the surface onto which the video is being rendered.

Metadata!

The most recent timed metadata.

Timeline!

The Timeline.

SimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated total buffered duration in milliseconds.

TrackSelectionParameters!

The currently active TrackSelectionParameters.

VideoSize!

The current video size.

@FloatRange(from = 0, to = 1.0) Float

The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).

Public functions

buildUpon

fun buildUpon(): SimpleBasePlayer.State.Builder!

Returns a Builder pre-populated with the current state values.

equals

fun equals(o: Any?): Boolean

getPlaylist

fun getPlaylist(): ImmutableList<SimpleBasePlayer.MediaItemData!>!

Returns the list of MediaItemData for the current playlist.

See also
setPlaylist

hashCode

fun hashCode(): Int

Public properties

adBufferedPositionMsSupplier

val adBufferedPositionMsSupplierSimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated position up to which the currently playing ad is buffered, in milliseconds. The value is unused if no ad is playing.

adPositionMsSupplier

val adPositionMsSupplierSimpleBasePlayer.PositionSupplier!

The PositionSupplier for the current ad playback position in milliseconds. The value is unused if no ad is playing.

audioAttributes

val audioAttributesAudioAttributes!

The current AudioAttributes.

availableCommands

val availableCommandsPlayer.Commands!

The available Commands.

contentBufferedPositionMsSupplier

val contentBufferedPositionMsSupplierSimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated position up to which the currently playing content is buffered, in milliseconds, or TIME_UNSET to indicate the default start position.

contentPositionMsSupplier

val contentPositionMsSupplierSimpleBasePlayer.PositionSupplier!

The PositionSupplier for the current content playback position in milliseconds, or TIME_UNSET to indicate the default start position.

currentAdGroupIndex

val currentAdGroupIndexInt

The current ad group index, or INDEX_UNSET if no ad is playing.

currentAdIndexInAdGroup

val currentAdIndexInAdGroupInt

The current ad index in the ad group, or INDEX_UNSET if no ad is playing.

currentCues

val currentCuesCueGroup!

The current cues.

currentMediaItemIndex

val currentMediaItemIndexInt

The current media item index, or INDEX_UNSET to assume the default first item of the playlist is played.

currentMetadata

val currentMetadataMediaMetadata!

The current combined MediaMetadata.

currentTracks

val currentTracksTracks!

The current Tracks.

deviceInfo

val deviceInfoDeviceInfo!

The DeviceInfo.

deviceVolume

val deviceVolume: @IntRange(from = 0) Int

The current device volume.

discontinuityPositionMs

val discontinuityPositionMsLong

The position, in milliseconds, in the current content or ad from which playback continued after the discontinuity. The value is unused if hasPositionDiscontinuity is false.

hasPositionDiscontinuity

val hasPositionDiscontinuityBoolean

Signals that a position discontinuity happened since the last update to the player.

isDeviceMuted

val isDeviceMutedBoolean

Whether the device is muted.

isLoading

val isLoadingBoolean

Whether the player is currently loading its source.

maxSeekToPreviousPositionMs

val maxSeekToPreviousPositionMsLong

The maximum position for which seekToPrevious seeks to the previous item, in milliseconds.

newlyRenderedFirstFrame

val newlyRenderedFirstFrameBoolean

Whether a frame has been rendered for the first time since setting the surface, a rendering reset, or since the stream being rendered was changed.

playWhenReady

val playWhenReadyBoolean

Whether playback should proceed when ready and not suppressed.

playWhenReadyChangeReason

@Player.PlayWhenReadyChangeReason
val playWhenReadyChangeReasonInt

The last reason for changing playWhenReady.

playbackParameters

val playbackParametersPlaybackParameters!

The currently active PlaybackParameters.

playbackState

@Player.State
val playbackStateInt

The state of the player.

playbackSuppressionReason

@Player.PlaybackSuppressionReason
val playbackSuppressionReasonInt

The reason why playback is suppressed even if getPlayWhenReady is true.

playerError

val playerErrorPlaybackException?

The last error that caused playback to fail, or null if there was no error.

playlistMetadata

val playlistMetadataMediaMetadata!

The playlist MediaMetadata.

positionDiscontinuityReason

@Player.DiscontinuityReason
val positionDiscontinuityReasonInt

The reason for the last position discontinuity. The value is unused if hasPositionDiscontinuity is false.

repeatMode

@Player.RepeatMode
val repeatModeInt

The RepeatMode used for playback.

seekBackIncrementMs

val seekBackIncrementMsLong

The seekBack increment in milliseconds.

seekForwardIncrementMs

val seekForwardIncrementMsLong

The seekForward increment in milliseconds.

shuffleModeEnabled

val shuffleModeEnabledBoolean

Whether shuffling of media items is enabled.

surfaceSize

val surfaceSizeSize!

The size of the surface onto which the video is being rendered.

timedMetadata

val timedMetadataMetadata!

The most recent timed metadata.

timeline

val timelineTimeline!

The Timeline.

totalBufferedDurationMsSupplier

val totalBufferedDurationMsSupplierSimpleBasePlayer.PositionSupplier!

The PositionSupplier for the estimated total buffered duration in milliseconds.

trackSelectionParameters

val trackSelectionParametersTrackSelectionParameters!

The currently active TrackSelectionParameters.

videoSize

val videoSizeVideoSize!

The current video size.

volume

val volume: @FloatRange(from = 0, to = 1.0) Float

The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).