SimpleBasePlayer.State
class SimpleBasePlayer.State
An immutable state description of the player.
Summary
Nested types |
|---|
|
A builder for |
Public functions |
|
|---|---|
SimpleBasePlayer.State.Builder! |
Returns a |
Boolean |
|
ImmutableList<SimpleBasePlayer.MediaItemData!>! |
Returns the list of |
Int |
hashCode() |
Public properties |
|
|---|---|
SimpleBasePlayer.PositionSupplier! |
The |
SimpleBasePlayer.PositionSupplier! |
The |
AudioAttributes! |
The current |
Int |
The current audio session ID. |
Player.Commands! |
The available |
SimpleBasePlayer.PositionSupplier! |
The |
SimpleBasePlayer.PositionSupplier! |
The |
Int |
The current ad group index, or |
Int |
The current ad index in the ad group, or |
CueGroup! |
The current |
Int |
The current media item index, or |
MediaMetadata! |
The current combined |
Tracks! |
The current |
DeviceInfo! |
The |
@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 |
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 |
PlaybackParameters! |
The currently active |
Int |
The |
Int |
The reason why playback is suppressed even if |
PlaybackException? |
The last error that caused playback to fail, or null if there was no error. |
MediaMetadata! |
The playlist |
Int |
The |
Int |
The |
Long |
The |
Long |
The |
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 |
SimpleBasePlayer.PositionSupplier! |
The |
TrackSelectionParameters! |
The currently active |
@FloatRange(from = 0, to = 1.0) Float |
The unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |
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.
getPlaylist
fun getPlaylist(): ImmutableList<SimpleBasePlayer.MediaItemData!>!
Returns the list of MediaItemData for the current playlist.
| See also | |
|---|---|
setPlaylist |
Public properties
adBufferedPositionMsSupplier
val adBufferedPositionMsSupplier: SimpleBasePlayer.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 adPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
The PositionSupplier for the current ad playback position in milliseconds. The value is unused if no ad is playing.
contentBufferedPositionMsSupplier
val contentBufferedPositionMsSupplier: 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.
contentPositionMsSupplier
val contentPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
The PositionSupplier for the current content playback position in milliseconds, or TIME_UNSET to indicate the default start position.
currentAdGroupIndex
val currentAdGroupIndex: Int
The current ad group index, or INDEX_UNSET if no ad is playing.
currentAdIndexInAdGroup
val currentAdIndexInAdGroup: Int
The current ad index in the ad group, or INDEX_UNSET if no ad is playing.
currentMediaItemIndex
val currentMediaItemIndex: Int
The current media item index, or INDEX_UNSET to assume the default first item of the playlist is played.
discontinuityPositionMs
val discontinuityPositionMs: Long
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 hasPositionDiscontinuity: Boolean
Signals that a position discontinuity happened since the last update to the player.
maxSeekToPreviousPositionMs
val maxSeekToPreviousPositionMs: Long
The maximum position for which seekToPrevious seeks to the previous item, in milliseconds.
newlyRenderedFirstFrame
val newlyRenderedFirstFrame: 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.
playWhenReady
val playWhenReady: Boolean
Whether playback should proceed when ready and not suppressed.
playWhenReadyChangeReason
@Player.PlayWhenReadyChangeReason
val playWhenReadyChangeReason: Int
The last reason for changing playWhenReady.
playbackParameters
val playbackParameters: PlaybackParameters!
The currently active PlaybackParameters.
playbackSuppressionReason
@Player.PlaybackSuppressionReason
val playbackSuppressionReason: Int
The reason why playback is suppressed even if getPlayWhenReady is true.
playerError
val playerError: PlaybackException?
The last error that caused playback to fail, or null if there was no error.
positionDiscontinuityReason
@Player.DiscontinuityReason
val positionDiscontinuityReason: Int
The reason for the last position discontinuity. The value is unused if hasPositionDiscontinuity is false.
totalBufferedDurationMsSupplier
val totalBufferedDurationMsSupplier: SimpleBasePlayer.PositionSupplier!
The PositionSupplier for the estimated total buffered duration in milliseconds.
trackSelectionParameters
val trackSelectionParameters: TrackSelectionParameters!
The currently active TrackSelectionParameters.
unmuteVolume
val unmuteVolume: @FloatRange(from = 0, to = 1.0) Float
The unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
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).