Class SimpleBasePlayer.State

  • Enclosing class:
    SimpleBasePlayer

    protected static final class SimpleBasePlayer.State
    extends Object
    An immutable state description of the player.
    • Field Detail

      • playWhenReady

        public final boolean playWhenReady
        Whether playback should proceed when ready and not suppressed.
      • playWhenReadyChangeReason

        @PlayWhenReadyChangeReason
        public final @com.google.android.exoplayer2.Player.PlayWhenReadyChangeReason int playWhenReadyChangeReason
        The last reason for changing playWhenReady.
      • playbackState

        @State
        public final @com.google.android.exoplayer2.Player.State int playbackState
        The state of the player.
      • playerError

        @Nullable
        public final PlaybackException playerError
        The last error that caused playback to fail, or null if there was no error.
      • repeatMode

        @RepeatMode
        public final @com.google.android.exoplayer2.Player.RepeatMode int repeatMode
        The Player.RepeatMode used for playback.
      • shuffleModeEnabled

        public final boolean shuffleModeEnabled
        Whether shuffling of media items is enabled.
      • isLoading

        public final boolean isLoading
        Whether the player is currently loading its source.
      • seekBackIncrementMs

        public final long seekBackIncrementMs
        The Player.seekBack() increment in milliseconds.
      • seekForwardIncrementMs

        public final long seekForwardIncrementMs
        The Player.seekForward() increment in milliseconds.
      • maxSeekToPreviousPositionMs

        public final long maxSeekToPreviousPositionMs
        The maximum position for which BasePlayer.seekToPrevious() seeks to the previous item, in milliseconds.
      • volume

        @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).
      • videoSize

        public final VideoSize videoSize
        The current video size.
      • currentCues

        public final CueGroup currentCues
        The current cues.
      • deviceVolume

        @IntRange(from=0L)
        public final int deviceVolume
        The current device volume.
      • isDeviceMuted

        public final boolean isDeviceMuted
        Whether the device is muted.
      • surfaceSize

        public final Size surfaceSize
        The size of the surface onto which the video is being rendered.
      • 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.
      • timedMetadata

        public final Metadata timedMetadata
        The most recent timed metadata.
      • currentMediaItemIndex

        public final int currentMediaItemIndex
        The current media item index, or C.INDEX_UNSET to assume the default first item of the playlist is played.
      • currentAdGroupIndex

        public final int currentAdGroupIndex
        The current ad group index, or C.INDEX_UNSET if no ad is playing.
      • currentAdIndexInAdGroup

        public final int currentAdIndexInAdGroup
        The current ad index in the ad group, or C.INDEX_UNSET if no ad is playing.
      • hasPositionDiscontinuity

        public final boolean hasPositionDiscontinuity
        Signals that a position discontinuity happened since the last update to the player.
      • positionDiscontinuityReason

        @DiscontinuityReason
        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.
      • 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.