SimpleBasePlayer.State
public final class SimpleBasePlayer.State
An immutable state description of the player.
Summary
Nested types |
|---|
public final class SimpleBasePlayer.State.BuilderA builder for |
Public fields |
|
|---|---|
final SimpleBasePlayer.PositionSupplier |
The |
final SimpleBasePlayer.PositionSupplier |
The |
final AudioAttributes |
The current |
final int |
The current audio session ID. |
final Player.Commands |
The available |
final SimpleBasePlayer.PositionSupplier |
The |
final SimpleBasePlayer.PositionSupplier |
The |
final int |
The current ad group index, or |
final int |
The current ad index in the ad group, or |
final CueGroup |
The current |
final int |
The current media item index, or |
final MediaMetadata |
The current combined |
final Tracks |
The current |
final DeviceInfo |
The |
final @IntRange(from = 0) int |
The current device volume. |
final long |
The position, in milliseconds, in the current content or ad from which playback continued after the discontinuity. |
final boolean |
Signals that a position discontinuity happened since the last update to the player. |
final boolean |
Whether the device is muted. |
final boolean |
Whether the player is currently loading its source. |
final long |
The maximum position for which |
final 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. |
final boolean |
Whether playback should proceed when ready and not suppressed. |
final int |
The last reason for changing |
final PlaybackParameters |
The currently active |
final int |
The |
final int |
The reason why playback is suppressed even if |
final @Nullable PlaybackException |
The last error that caused playback to fail, or null if there was no error. |
final MediaMetadata |
The playlist |
final int |
The |
final int |
The |
final long |
The |
final long |
The |
final boolean |
Whether shuffling of media items is enabled. |
final Size |
The size of the surface onto which the video is being rendered. |
final Metadata |
The most recent timed metadata. |
final Timeline |
The |
final SimpleBasePlayer.PositionSupplier |
The |
final TrackSelectionParameters |
The currently active |
final @FloatRange(from = 0, to = 1.0) float |
The unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |
final VideoSize |
The current video size. |
final @FloatRange(from = 0, to = 1.0) float |
The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |
Public methods |
|
|---|---|
SimpleBasePlayer.State.Builder |
Returns a |
boolean |
|
ImmutableList<SimpleBasePlayer.MediaItemData> |
Returns the list of |
int |
hashCode() |
Public fields
adBufferedPositionMsSupplier
public final SimpleBasePlayer.PositionSupplier adBufferedPositionMsSupplier
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
public final SimpleBasePlayer.PositionSupplier adPositionMsSupplier
The PositionSupplier for the current ad playback position in milliseconds. The value is unused if no ad is playing.
contentBufferedPositionMsSupplier
public final SimpleBasePlayer.PositionSupplier contentBufferedPositionMsSupplier
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
public final SimpleBasePlayer.PositionSupplier contentPositionMsSupplier
The PositionSupplier for the current content playback position in milliseconds, or TIME_UNSET to indicate the default start position.
currentAdGroupIndex
public final int currentAdGroupIndex
The current ad group index, or INDEX_UNSET if no ad is playing.
currentAdIndexInAdGroup
public final int currentAdIndexInAdGroup
The current ad index in the ad group, or INDEX_UNSET if no ad is playing.
currentMediaItemIndex
public final int currentMediaItemIndex
The current media item index, or INDEX_UNSET to assume the default first item of the playlist is played.
discontinuityPositionMs
public final long discontinuityPositionMs
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
public final boolean hasPositionDiscontinuity
Signals that a position discontinuity happened since the last update to the player.
maxSeekToPreviousPositionMs
public final long maxSeekToPreviousPositionMs
The maximum position for which seekToPrevious seeks to the previous item, in milliseconds.
newlyRenderedFirstFrame
public final boolean newlyRenderedFirstFrame
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
public final boolean playWhenReady
Whether playback should proceed when ready and not suppressed.
playWhenReadyChangeReason
@Player.PlayWhenReadyChangeReason
public final int playWhenReadyChangeReason
The last reason for changing playWhenReady.
playbackParameters
public final PlaybackParameters playbackParameters
The currently active PlaybackParameters.
playbackSuppressionReason
@Player.PlaybackSuppressionReason
public final int playbackSuppressionReason
The reason why playback is suppressed even if getPlayWhenReady is true.
playerError
public final @Nullable PlaybackException playerError
The last error that caused playback to fail, or null if there was no error.
positionDiscontinuityReason
@Player.DiscontinuityReason
public final int positionDiscontinuityReason
The reason for the last position discontinuity. The value is unused if hasPositionDiscontinuity is false.
seekForwardIncrementMs
public final long seekForwardIncrementMs
The seekForward increment in milliseconds.
shuffleModeEnabled
public final boolean shuffleModeEnabled
Whether shuffling of media items is enabled.
surfaceSize
public final Size surfaceSize
The size of the surface onto which the video is being rendered.
totalBufferedDurationMsSupplier
public final SimpleBasePlayer.PositionSupplier totalBufferedDurationMsSupplier
The PositionSupplier for the estimated total buffered duration in milliseconds.
trackSelectionParameters
public final TrackSelectionParameters trackSelectionParameters
The currently active TrackSelectionParameters.
unmuteVolume
public final @FloatRange(from = 0, to = 1.0) float unmuteVolume
The unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
volume
public final @FloatRange(from = 0, to = 1.0) float volume
The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
Public methods
buildUpon
public SimpleBasePlayer.State.Builder buildUpon()
Returns a Builder pre-populated with the current state values.
getPlaylist
public ImmutableList<SimpleBasePlayer.MediaItemData> getPlaylist()
Returns the list of MediaItemData for the current playlist.
| See also | |
|---|---|
setPlaylist |