docs/doc/reference/com/google/android/exoplayer2/SimpleBasePlayer.State.html
Package com.google.android.exoplayer2
Enclosing class:SimpleBasePlayer
protected static final classSimpleBasePlayer.Stateextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
An immutable state description of the player.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | SimpleBasePlayer.State.Builder |
A builder for SimpleBasePlayer.State objects.
|
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| SimpleBasePlayer.PositionSupplier | adBufferedPositionMsSupplier |
The SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently playing ad is buffered, in milliseconds.
|
| SimpleBasePlayer.PositionSupplier | adPositionMsSupplier |
The SimpleBasePlayer.PositionSupplier for the current ad playback position in milliseconds.
|
| AudioAttributes | audioAttributes |
The current AudioAttributes.
|
| Player.Commands | availableCommands |
The available Player.Commands.
|
| SimpleBasePlayer.PositionSupplier | contentBufferedPositionMsSupplier |
The SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently playing content is buffered, in milliseconds, or C.TIME_UNSET to indicate the default start position.
|
| SimpleBasePlayer.PositionSupplier | contentPositionMsSupplier |
The SimpleBasePlayer.PositionSupplier for the current content playback position in milliseconds, or C.TIME_UNSET to indicate the default start position.
|
| int | currentAdGroupIndex |
The current ad group index, or C.INDEX_UNSET if no ad is playing.
|
| int | currentAdIndexInAdGroup |
The current ad index in the ad group, or C.INDEX_UNSET if no ad is playing.
|
| CueGroup | currentCues |
The current cues.
|
| int | currentMediaItemIndex |
The current media item index, or C.INDEX_UNSET to assume the default first item of the playlist is played.
|
| DeviceInfo | deviceInfo |
The DeviceInfo.
|
| int | deviceVolume |
The current device volume.
|
| long | discontinuityPositionMs |
The position, in milliseconds, in the current content or ad from which playback continued after the discontinuity.
|
| boolean | hasPositionDiscontinuity |
Signals that a position discontinuity happened since the last update to the player.
|
| boolean | isDeviceMuted |
Whether the device is muted.
|
| boolean | isLoading |
Whether the player is currently loading its source.
|
| long | maxSeekToPreviousPositionMs |
The maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, in milliseconds.
|
| 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.
|
| PlaybackParameters | playbackParameters |
The currently active PlaybackParameters.
|
| @com.google.android.exoplayer2.Player.State int | playbackState |
The state of the player.
|
| @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int | playbackSuppressionReason |
The reason why playback is suppressed even if SimpleBasePlayer.getPlayWhenReady() is true.
|
| PlaybackException | playerError |
The last error that caused playback to fail, or null if there was no error.
|
| ImmutableList<SimpleBasePlayer.MediaItemData> | playlist |
The media items in the playlist.
|
| MediaMetadata | playlistMetadata |
The playlist MediaMetadata.
|
| boolean | playWhenReady |
Whether playback should proceed when ready and not suppressed.
|
| @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int | playWhenReadyChangeReason |
The last reason for changing playWhenReady.
|
| @com.google.android.exoplayer2.Player.DiscontinuityReason int | positionDiscontinuityReason |
The reason for the last position discontinuity.
|
| @com.google.android.exoplayer2.Player.RepeatMode int | repeatMode |
The Player.RepeatMode used for playback.
|
| long | seekBackIncrementMs |
The Player.seekBack() increment in milliseconds.
|
| long | seekForwardIncrementMs |
The Player.seekForward() increment in milliseconds.
|
| boolean | shuffleModeEnabled |
Whether shuffling of media items is enabled.
|
| Size | surfaceSize |
The size of the surface onto which the video is being rendered.
|
| Metadata | timedMetadata |
The most recent timed metadata.
|
| Timeline | timeline |
The Timeline derived from the playlist.
|
| SimpleBasePlayer.PositionSupplier | totalBufferedDurationMsSupplier |
The SimpleBasePlayer.PositionSupplier for the estimated total buffered duration in milliseconds.
|
| TrackSelectionParameters | trackSelectionParameters |
The currently active TrackSelectionParameters.
|
| VideoSize | videoSize |
The current video size.
|
| float | volume |
The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| SimpleBasePlayer.State.Builder | buildUpon() |
Returns a SimpleBasePlayer.State.Builder pre-populated with the current state values.
|
| boolean | equals(Object o) | |
| int | hashCode() | |
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public final[Player.Commands](Player.Commands.html "class in com.google.android.exoplayer2")availableCommands
The available Player.Commands.
-
public final boolean playWhenReady
Whether playback should proceed when ready and not suppressed.
-
[@PlayWhenReadyChangeReason](Player.PlayWhenReadyChangeReason.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int playWhenReadyChangeReason
The last reason for changing playWhenReady.
-
[@State](Player.State.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.Player.State int playbackState
The state of the player.
-
[@PlaybackSuppressionReason](Player.PlaybackSuppressionReason.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.Player.PlaybackSuppressionReason int playbackSuppressionReason
The reason why playback is suppressed even if SimpleBasePlayer.getPlayWhenReady() is true.
-
@Nullable
public final[PlaybackException](PlaybackException.html "class in com.google.android.exoplayer2")playerError
The last error that caused playback to fail, or null if there was no error.
-
[@RepeatMode](Player.RepeatMode.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.Player.RepeatMode int repeatMode
The Player.RepeatMode used for playback.
-
public final boolean shuffleModeEnabled
Whether shuffling of media items is enabled.
-
public final boolean isLoading
Whether the player is currently loading its source.
-
public final long seekBackIncrementMs
The Player.seekBack() increment in milliseconds.
-
public final long seekForwardIncrementMs
The Player.seekForward() increment in milliseconds.
-
public final long maxSeekToPreviousPositionMs
The maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, in milliseconds.
-
public final[PlaybackParameters](PlaybackParameters.html "class in com.google.android.exoplayer2")playbackParameters
The currently active PlaybackParameters.
-
public final[TrackSelectionParameters](trackselection/TrackSelectionParameters.html "class in com.google.android.exoplayer2.trackselection")trackSelectionParameters
The currently active TrackSelectionParameters.
-
public final[AudioAttributes](audio/AudioAttributes.html "class in com.google.android.exoplayer2.audio")audioAttributes
The current AudioAttributes.
-
@FloatRange(from=0.0,
to=1.0)
public final float volume
The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
-
public final[VideoSize](video/VideoSize.html "class in com.google.android.exoplayer2.video")videoSize
The current video size.
-
public final[CueGroup](text/CueGroup.html "class in com.google.android.exoplayer2.text")currentCues
The current cues.
-
public final[DeviceInfo](DeviceInfo.html "class in com.google.android.exoplayer2")deviceInfo
The DeviceInfo.
-
@IntRange(from=0L)
public final int deviceVolume
The current device volume.
-
public final boolean isDeviceMuted
Whether the device is muted.
-
public final[Size](util/Size.html "class in com.google.android.exoplayer2.util")surfaceSize
The size of the surface onto which the video is being rendered.
-
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.
-
public final[Metadata](metadata/Metadata.html "class in com.google.android.exoplayer2.metadata")timedMetadata
The most recent timed metadata.
-
public final[ImmutableList](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableList.html?is-external=true "class or interface in com.google.common.collect")<[SimpleBasePlayer.MediaItemData](SimpleBasePlayer.MediaItemData.html "class in com.google.android.exoplayer2")> playlist
The media items in the playlist.
-
public final[Timeline](Timeline.html "class in com.google.android.exoplayer2")timeline
The Timeline derived from the playlist.
-
public final[MediaMetadata](MediaMetadata.html "class in com.google.android.exoplayer2")playlistMetadata
The playlist MediaMetadata.
-
public final int currentMediaItemIndex
The current media item index, or C.INDEX_UNSET to assume the default first item of the playlist is played.
-
public final int currentAdGroupIndex
The current ad group index, or C.INDEX_UNSET if no ad is playing.
-
public final int currentAdIndexInAdGroup
The current ad index in the ad group, or C.INDEX_UNSET if no ad is playing.
-
public final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")contentPositionMsSupplier
The SimpleBasePlayer.PositionSupplier for the current content playback position in milliseconds, or C.TIME_UNSET to indicate the default start position.
-
public final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")adPositionMsSupplier
The SimpleBasePlayer.PositionSupplier for the current ad playback position in milliseconds. The value is unused if no ad is playing.
-
public final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")contentBufferedPositionMsSupplier
The SimpleBasePlayer.PositionSupplier for the estimated position up to which the currently playing content is buffered, in milliseconds, or C.TIME_UNSET to indicate the default start position.
-
public final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")adBufferedPositionMsSupplier
The SimpleBasePlayer.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.
-
public final[SimpleBasePlayer.PositionSupplier](SimpleBasePlayer.PositionSupplier.html "interface in com.google.android.exoplayer2")totalBufferedDurationMsSupplier
The SimpleBasePlayer.PositionSupplier for the estimated total buffered duration in milliseconds.
-
public final boolean hasPositionDiscontinuity
Signals that a position discontinuity happened since the last update to the player.
-
[@DiscontinuityReason](Player.DiscontinuityReason.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.Player.DiscontinuityReason int positionDiscontinuityReason
The reason for the last position discontinuity. The value is unused if hasPositionDiscontinuity is false.
-
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.
-
public[SimpleBasePlayer.State.Builder](SimpleBasePlayer.State.Builder.html "class in com.google.android.exoplayer2")buildUpon()
Returns a SimpleBasePlayer.State.Builder pre-populated with the current state values.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")o)
Overrides:equals in class Object
-
public int hashCode()
Overrides:hashCode in class Object