Package com.google.android.exoplayer2

## Class BasePlayer

- java.lang.Object
- - com.google.android.exoplayer2.BasePlayer

- All Implemented Interfaces:
    `Player`
  Direct Known Subclasses:
    `CastPlayer`, `SimpleExoPlayer`, `StubExoPlayer`

      public abstract class BasePlayer
      extends Object
      implements Player

  Abstract base `Player` which implements common implementation independent methods.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Player

      `Player.Command, Player.Commands, Player.DiscontinuityReason, Player.EventFlags, Player.EventListener, Player.Events, Player.Listener, Player.MediaItemTransitionReason, Player.PlaybackSuppressionReason, Player.PlayWhenReadyChangeReason, Player.PositionInfo, Player.RepeatMode, Player.State, Player.TimelineChangeReason`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected Timeline.Window` | `window` |

    - ### Fields inherited from interface com.google.android.exoplayer2.Player

      `COMMAND_ADJUST_DEVICE_VOLUME, COMMAND_CHANGE_MEDIA_ITEMS, COMMAND_GET_AUDIO_ATTRIBUTES, COMMAND_GET_CURRENT_MEDIA_ITEM, COMMAND_GET_DEVICE_VOLUME, COMMAND_GET_MEDIA_ITEMS, COMMAND_GET_MEDIA_ITEMS_METADATA, COMMAND_GET_TEXT, COMMAND_GET_VOLUME, COMMAND_PLAY_PAUSE, COMMAND_PREPARE_STOP, COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM, COMMAND_SEEK_TO_DEFAULT_POSITION, COMMAND_SEEK_TO_MEDIA_ITEM, COMMAND_SEEK_TO_NEXT_MEDIA_ITEM, COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM, COMMAND_SET_DEVICE_VOLUME, COMMAND_SET_REPEAT_MODE, COMMAND_SET_SHUFFLE_MODE, COMMAND_SET_SPEED_AND_PITCH, COMMAND_SET_VIDEO_SURFACE, COMMAND_SET_VOLUME, DISCONTINUITY_REASON_AUTO_TRANSITION, DISCONTINUITY_REASON_INTERNAL, DISCONTINUITY_REASON_REMOVE, DISCONTINUITY_REASON_SEEK, DISCONTINUITY_REASON_SEEK_ADJUSTMENT, DISCONTINUITY_REASON_SKIP, EVENT_AVAILABLE_COMMANDS_CHANGED, EVENT_IS_LOADING_CHANGED, EVENT_IS_PLAYING_CHANGED, EVENT_MEDIA_ITEM_TRANSITION, EVENT_MEDIA_METADATA_CHANGED, EVENT_PLAY_WHEN_READY_CHANGED, EVENT_PLAYBACK_PARAMETERS_CHANGED, EVENT_PLAYBACK_STATE_CHANGED, EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED, EVENT_PLAYER_ERROR, EVENT_POSITION_DISCONTINUITY, EVENT_REPEAT_MODE_CHANGED, EVENT_SHUFFLE_MODE_ENABLED_CHANGED, EVENT_STATIC_METADATA_CHANGED, EVENT_TIMELINE_CHANGED, EVENT_TRACKS_CHANGED, MEDIA_ITEM_TRANSITION_REASON_AUTO, MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED, MEDIA_ITEM_TRANSITION_REASON_REPEAT, MEDIA_ITEM_TRANSITION_REASON_SEEK, PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY, PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS, PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM, PLAY_WHEN_READY_CHANGE_REASON_REMOTE, PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST, PLAYBACK_SUPPRESSION_REASON_NONE, PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS, REPEAT_MODE_ALL, REPEAT_MODE_OFF, REPEAT_MODE_ONE, STATE_BUFFERING, STATE_ENDED, STATE_IDLE, STATE_READY, TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED, TIMELINE_CHANGE_REASON_SOURCE_UPDATE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BasePlayer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMediaItem​(int index, MediaItem mediaItem)` | Adds a media item at the given index of the playlist.
    `void` | `addMediaItem​(MediaItem mediaItem)` | Adds a media item to the end of the playlist.
    `void` | `addMediaItems​(List<MediaItem> mediaItems)` | Adds a list of media items to the end of the playlist.
    `void` | `clearMediaItems()` | Clears the playlist.
    `protected Player.Commands` | `getAvailableCommands​(Player.Commands permanentAvailableCommands)` |
    `int` | `getBufferedPercentage()` | Returns an estimate of the percentage in the current content window or ad up to which data is buffered, or 0 if no estimate is available.
    `long` | `getContentDuration()` | If `Player.isPlayingAd()` returns `true`, returns the duration of the current content window in milliseconds, or `C.TIME_UNSET` if the duration is not known.
    `long` | `getCurrentLiveOffset()` | Returns the offset of the current playback position from the live edge in milliseconds, or `C.TIME_UNSET` if the current window `isn't live` or the offset is unknown.
    `Object` | `getCurrentManifest()` | Returns the current manifest.
    `MediaItem` | `getCurrentMediaItem()` | Returns the media item of the current window in the timeline.
    `Object` | `getCurrentTag()` | Deprecated. Use `getCurrentMediaItem()` and `MediaItem.PlaybackProperties.tag` instead.
    `MediaItem` | `getMediaItemAt​(int index)` | Returns the `MediaItem` at the given index.
    `int` | `getMediaItemCount()` | Returns the number of `media items` in the playlist.
    `int` | `getNextWindowIndex()` | Returns the index of the window that will be played if `Player.next()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `ExoPlaybackException` | `getPlaybackError()` | Deprecated. Use `Player.getPlayerError()` instead.
    `int` | `getPreviousWindowIndex()` | Returns the index of the window that will be played if `Player.previous()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `boolean` | `hasNext()` | Returns whether a next window exists, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `boolean` | `hasPrevious()` | Returns whether a previous window exists, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `boolean` | `isCommandAvailable​(int command)` | Returns whether the provided `Player.Command` is available.
    `boolean` | `isCurrentWindowDynamic()` | Returns whether the current window is dynamic, or `false` if the `Timeline` is empty.
    `boolean` | `isCurrentWindowLive()` | Returns whether the current window is live, or `false` if the `Timeline` is empty.
    `boolean` | `isCurrentWindowSeekable()` | Returns whether the current window is seekable, or `false` if the `Timeline` is empty.
    `boolean` | `isPlaying()` | Returns whether the player is playing, i.e.
    `void` | `moveMediaItem​(int currentIndex, int newIndex)` | Moves the media item at the current index to the new index.
    `void` | `next()` | Seeks to the default position of the next window, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `void` | `pause()` | Pauses playback.
    `void` | `play()` | Resumes playback as soon as `Player.getPlaybackState()` == `Player.STATE_READY`.
    `void` | `previous()` | Seeks to the default position of the previous window, which may depend on the current repeat mode and whether shuffle mode is enabled.
    `void` | `removeMediaItem​(int index)` | Removes the media item at the given index of the playlist.
    `void` | `seekTo​(long positionMs)` | Seeks to a position specified in milliseconds in the current window.
    `void` | `seekToDefaultPosition()` | Seeks to the default position associated with the current window.
    `void` | `seekToDefaultPosition​(int windowIndex)` | Seeks to the default position associated with the specified window.
    `void` | `setMediaItem​(MediaItem mediaItem)` | Clears the playlist, adds the specified `MediaItem` and resets the position to the default position.
    `void` | `setMediaItem​(MediaItem mediaItem, boolean resetPosition)` | Clears the playlist and adds the specified `MediaItem`.
    `void` | `setMediaItem​(MediaItem mediaItem, long startPositionMs)` | Clears the playlist and adds the specified `MediaItem`.
    `void` | `setMediaItems​(List<MediaItem> mediaItems)` | Clears the playlist, adds the specified `MediaItems` and resets the position to the default position.
    `void` | `setPlaybackSpeed​(float speed)` | Changes the rate at which playback occurs.
    `void` | `stop()` | Stops playback without resetting the player.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.android.exoplayer2.Player

      `addListener, addListener, addMediaItems, clearVideoSurface, clearVideoSurface, clearVideoSurfaceHolder, clearVideoSurfaceView, clearVideoTextureView, decreaseDeviceVolume, getApplicationLooper, getAudioAttributes, getAvailableCommands, getBufferedPosition, getContentBufferedPosition, getContentPosition, getCurrentAdGroupIndex, getCurrentAdIndexInAdGroup, getCurrentCues, getCurrentPeriodIndex, getCurrentPosition, getCurrentStaticMetadata, getCurrentTimeline, getCurrentTrackGroups, getCurrentTrackSelections, getCurrentWindowIndex, getDeviceInfo, getDeviceVolume, getDuration, getMediaMetadata, getPlaybackParameters, getPlaybackState, getPlaybackSuppressionReason, getPlayerError, getPlayWhenReady, getRepeatMode, getShuffleModeEnabled, getTotalBufferedDuration, getVideoSize, getVolume, increaseDeviceVolume, isDeviceMuted, isLoading, isPlayingAd, moveMediaItems, prepare, release, removeListener, removeListener, removeMediaItems, seekTo, setDeviceMuted, setDeviceVolume, setMediaItems, setMediaItems, setPlaybackParameters, setPlayWhenReady, setRepeatMode, setShuffleModeEnabled, setVideoSurface, setVideoSurfaceHolder, setVideoSurfaceView, setVideoTextureView, setVolume, stop`

- - ### Field Detail

    - #### window

          protected final Timeline.Window window

  - ### Constructor Detail

    - #### BasePlayer

          public BasePlayer()

  - ### Method Detail

    - #### setMediaItem

          public final void setMediaItem​(MediaItem mediaItem)

      Description copied from interface: `Player`
      Clears the playlist, adds the specified `MediaItem` and resets the position to the default position.
      Specified by:
        `setMediaItem` in interface `Player`
      Parameters:
        `mediaItem` - The new `MediaItem`.

    - #### setMediaItem

          public final void setMediaItem​(MediaItem mediaItem,
                                         long startPositionMs)

      Description copied from interface: `Player`
      Clears the playlist and adds the specified `MediaItem`.
      Specified by:
        `setMediaItem` in interface `Player`
      Parameters:
        `mediaItem` - The new `MediaItem`.
        `startPositionMs` - The position in milliseconds to start playback from.

    - #### setMediaItem

          public final void setMediaItem​(MediaItem mediaItem,
                                         boolean resetPosition)

      Description copied from interface: `Player`
      Clears the playlist and adds the specified `MediaItem`.
      Specified by:
        `setMediaItem` in interface `Player`
      Parameters:
        `mediaItem` - The new `MediaItem`.
        `resetPosition` - Whether the playback position should be reset to the default position. If false, playback will start from the position defined by `Player.getCurrentWindowIndex()` and `Player.getCurrentPosition()`.

    - #### setMediaItems

          public final void setMediaItems​(List<MediaItem> mediaItems)

      Description copied from interface: `Player`
      Clears the playlist, adds the specified `MediaItems` and resets the position to the default position.
      Specified by:
        `setMediaItems` in interface `Player`
      Parameters:
        `mediaItems` - The new `MediaItems`.

    - #### addMediaItem

          public final void addMediaItem​(int index,
                                         MediaItem mediaItem)

      Description copied from interface: `Player`
      Adds a media item at the given index of the playlist.
      Specified by:
        `addMediaItem` in interface `Player`
      Parameters:
        `index` - The index at which to add the media item. If the index is larger than the size of the playlist, the media item is added to the end of the playlist.
        `mediaItem` - The `MediaItem` to add.

    - #### addMediaItem

          public final void addMediaItem​(MediaItem mediaItem)

      Description copied from interface: `Player`
      Adds a media item to the end of the playlist.
      Specified by:
        `addMediaItem` in interface `Player`
      Parameters:
        `mediaItem` - The `MediaItem` to add.

    - #### addMediaItems

          public final void addMediaItems​(List<MediaItem> mediaItems)

      Description copied from interface: `Player`
      Adds a list of media items to the end of the playlist.
      Specified by:
        `addMediaItems` in interface `Player`
      Parameters:
        `mediaItems` - The `MediaItems` to add.

    - #### moveMediaItem

          public final void moveMediaItem​(int currentIndex,
                                          int newIndex)

      Description copied from interface: `Player`
      Moves the media item at the current index to the new index.
      Specified by:
        `moveMediaItem` in interface `Player`
      Parameters:
        `currentIndex` - The current index of the media item to move.
        `newIndex` - The new index of the media item. If the new index is larger than the size of the playlist the item is moved to the end of the playlist.

    - #### removeMediaItem

          public final void removeMediaItem​(int index)

      Description copied from interface: `Player`
      Removes the media item at the given index of the playlist.
      Specified by:
        `removeMediaItem` in interface `Player`
      Parameters:
        `index` - The index at which to remove the media item.

    - #### clearMediaItems

          public final void clearMediaItems()

      Description copied from interface: `Player`
      Clears the playlist.
      Specified by:
        `clearMediaItems` in interface `Player`

    - #### isCommandAvailable

          public final boolean isCommandAvailable​(@Command
                                                  int command)

      Description copied from interface: `Player`
      Returns whether the provided `Player.Command` is available.

      This method does not execute the command.

      Executing a command that is not available (for example, calling `Player.next()` if `Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM` is unavailable) will neither throw an exception nor generate a `Player.getPlayerError()` player error}.

      `Player.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM` and `Player.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM` are unavailable if there is no such `MediaItem`.

      Specified by:
        `isCommandAvailable` in interface `Player`
      Parameters:
        `command` - A `Player.Command`.
      Returns:
        Whether the `Player.Command` is available.
      See Also:
        `Player.EventListener.onAvailableCommandsChanged(Commands)`

    - #### getPlaybackError

          @Deprecated
          @Nullable
          public final ExoPlaybackException getPlaybackError()

      Deprecated.
      Use `Player.getPlayerError()` instead.
      Specified by:
        `getPlaybackError` in interface `Player`

    - #### play

          public final void play()

      Description copied from interface: `Player`
      Resumes playback as soon as `Player.getPlaybackState()` == `Player.STATE_READY`. Equivalent to `setPlayWhenReady(true)`.
      Specified by:
        `play` in interface `Player`

    - #### pause

          public final void pause()

      Description copied from interface: `Player`
      Pauses playback. Equivalent to `setPlayWhenReady(false)`.
      Specified by:
        `pause` in interface `Player`

    - #### isPlaying

          public final boolean isPlaying()

      Description copied from interface: `Player`
      Returns whether the player is playing, i.e. `Player.getCurrentPosition()` is advancing.

      If `false`, then at least one of the following is true:

      - The `playback state` is not `ready`.
      - There is no `intention to play`.
      - Playback is `suppressed for other reasons`.
      Specified by:
        `isPlaying` in interface `Player`
      Returns:
        Whether the player is playing.
      See Also:
        `Player.EventListener.onIsPlayingChanged(boolean)`

    - #### seekToDefaultPosition

          public final void seekToDefaultPosition()

      Description copied from interface: `Player`
      Seeks to the default position associated with the current window. The position can depend on the type of media being played. For live streams it will typically be the live edge of the window. For other streams it will typically be the start of the window.
      Specified by:
        `seekToDefaultPosition` in interface `Player`

    - #### seekToDefaultPosition

          public final void seekToDefaultPosition​(int windowIndex)

      Description copied from interface: `Player`
      Seeks to the default position associated with the specified window. The position can depend on the type of media being played. For live streams it will typically be the live edge of the window. For other streams it will typically be the start of the window.
      Specified by:
        `seekToDefaultPosition` in interface `Player`
      Parameters:
        `windowIndex` - The index of the window whose associated default position should be seeked to.

    - #### seekTo

          public final void seekTo​(long positionMs)

      Description copied from interface: `Player`
      Seeks to a position specified in milliseconds in the current window.
      Specified by:
        `seekTo` in interface `Player`
      Parameters:
        `positionMs` - The seek position in the current window, or `C.TIME_UNSET` to seek to the window's default position.

    - #### hasPrevious

          public final boolean hasPrevious()

      Description copied from interface: `Player`
      Returns whether a previous window exists, which may depend on the current repeat mode and whether shuffle mode is enabled.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `hasPrevious` in interface `Player`

    - #### previous

          public final void previous()

      Description copied from interface: `Player`
      Seeks to the default position of the previous window, which may depend on the current repeat mode and whether shuffle mode is enabled. Does nothing if `Player.hasPrevious()` is `false`.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `previous` in interface `Player`

    - #### hasNext

          public final boolean hasNext()

      Description copied from interface: `Player`
      Returns whether a next window exists, which may depend on the current repeat mode and whether shuffle mode is enabled.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `hasNext` in interface `Player`

    - #### next

          public final void next()

      Description copied from interface: `Player`
      Seeks to the default position of the next window, which may depend on the current repeat mode and whether shuffle mode is enabled. Does nothing if `Player.hasNext()` is `false`.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `next` in interface `Player`

    - #### setPlaybackSpeed

          public final void setPlaybackSpeed​(float speed)

      Description copied from interface: `Player`
      Changes the rate at which playback occurs. The pitch is not changed.

      This is equivalent to `setPlaybackParameters(getPlaybackParameters().withSpeed(speed))`.

      Specified by:
        `setPlaybackSpeed` in interface `Player`
      Parameters:
        `speed` - The linear factor by which playback will be sped up. Must be higher than 0. 1 is normal speed, 2 is twice as fast, 0.5 is half normal speed...

    - #### stop

          public final void stop()

      Description copied from interface: `Player`
      Stops playback without resetting the player. Use `Player.pause()` rather than this method if the intention is to pause playback.

      Calling this method will cause the playback state to transition to `Player.STATE_IDLE`. The player instance can still be used, and `Player.release()` must still be called on the player if it's no longer required.

      Calling this method does not clear the playlist, reset the playback position or the playback error.

      Specified by:
        `stop` in interface `Player`

    - #### getNextWindowIndex

          public final int getNextWindowIndex()

      Description copied from interface: `Player`
      Returns the index of the window that will be played if `Player.next()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled. Returns `C.INDEX_UNSET` if `Player.hasNext()` is `false`.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `getNextWindowIndex` in interface `Player`

    - #### getPreviousWindowIndex

          public final int getPreviousWindowIndex()

      Description copied from interface: `Player`
      Returns the index of the window that will be played if `Player.previous()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled. Returns `C.INDEX_UNSET` if `Player.hasPrevious()` is `false`.

      Note: When the repeat mode is `Player.REPEAT_MODE_ONE`, this method behaves the same as when the current repeat mode is `Player.REPEAT_MODE_OFF`. See `Player.REPEAT_MODE_ONE` for more details.

      Specified by:
        `getPreviousWindowIndex` in interface `Player`

    - #### getCurrentTag

          @Deprecated
          @Nullable
          public final Object getCurrentTag()

      Deprecated.
      Use `getCurrentMediaItem()` and `MediaItem.PlaybackProperties.tag` instead.
      Specified by:
        `getCurrentTag` in interface `Player`

    - #### getCurrentMediaItem

          @Nullable
          public final MediaItem getCurrentMediaItem()

      Description copied from interface: `Player`
      Returns the media item of the current window in the timeline. May be null if the timeline is empty.
      Specified by:
        `getCurrentMediaItem` in interface `Player`
      See Also:
        `Player.EventListener.onMediaItemTransition(MediaItem, int)`

    - #### getMediaItemCount

          public final int getMediaItemCount()

      Description copied from interface: `Player`
      Returns the number of `media items` in the playlist.
      Specified by:
        `getMediaItemCount` in interface `Player`

    - #### getMediaItemAt

          public final MediaItem getMediaItemAt​(int index)

      Description copied from interface: `Player`
      Returns the `MediaItem` at the given index.
      Specified by:
        `getMediaItemAt` in interface `Player`

    - #### getCurrentManifest

          @Nullable
          public final Object getCurrentManifest()

      Description copied from interface: `Player`
      Returns the current manifest. The type depends on the type of media being played. May be null.
      Specified by:
        `getCurrentManifest` in interface `Player`

    - #### getBufferedPercentage

          public final int getBufferedPercentage()

      Description copied from interface: `Player`
      Returns an estimate of the percentage in the current content window or ad up to which data is buffered, or 0 if no estimate is available.
      Specified by:
        `getBufferedPercentage` in interface `Player`

    - #### isCurrentWindowDynamic

          public final boolean isCurrentWindowDynamic()

      Description copied from interface: `Player`
      Returns whether the current window is dynamic, or `false` if the `Timeline` is empty.
      Specified by:
        `isCurrentWindowDynamic` in interface `Player`
      See Also:
        `Timeline.Window.isDynamic`

    - #### isCurrentWindowLive

          public final boolean isCurrentWindowLive()

      Description copied from interface: `Player`
      Returns whether the current window is live, or `false` if the `Timeline` is empty.
      Specified by:
        `isCurrentWindowLive` in interface `Player`
      See Also:
        `Timeline.Window.isLive()`

    - #### getCurrentLiveOffset

          public final long getCurrentLiveOffset()

      Description copied from interface: `Player`
      Returns the offset of the current playback position from the live edge in milliseconds, or `C.TIME_UNSET` if the current window `isn't live` or the offset is unknown.

      The offset is calculated as `currentTime - playbackPosition`, so should usually be positive.

      Note that this offset may rely on an accurate local time, so this method may return an incorrect value if the difference between system clock and server clock is unknown.

      Specified by:
        `getCurrentLiveOffset` in interface `Player`

    - #### isCurrentWindowSeekable

          public final boolean isCurrentWindowSeekable()

      Description copied from interface: `Player`
      Returns whether the current window is seekable, or `false` if the `Timeline` is empty.
      Specified by:
        `isCurrentWindowSeekable` in interface `Player`
      See Also:
        `Timeline.Window.isSeekable`

    - #### getContentDuration

          public final long getContentDuration()

      Description copied from interface: `Player`
      If `Player.isPlayingAd()` returns `true`, returns the duration of the current content window in milliseconds, or `C.TIME_UNSET` if the duration is not known. If there is no ad playing, the returned duration is the same as that returned by `Player.getDuration()`.
      Specified by:
        `getContentDuration` in interface `Player`

    - #### getAvailableCommands

          protected Player.Commands getAvailableCommands​(Player.Commands permanentAvailableCommands)