# FakePlayer

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/FakePlayer.kt+class:androidx.media3.test.utils.FakePlayer)

*** ** * ** ***


```
@UnstableApi
public final class FakePlayer extends SimpleBasePlayer
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.media3.common.BasePlayer](https://developer.android.com/reference/androidx/media3/common/BasePlayer) |||
|   | ↳ | [androidx.media3.common.SimpleBasePlayer](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer) ||
|   |   | ↳ | [androidx.media3.test.utils.FakePlayer](https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer) |

*** ** * ** ***

A fake `https://developer.android.com/reference/androidx/media3/common/Player` that uses `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer`'s minimal number of default methods implementations to build upon to simulate realistic playback scenarios for testing.

## Summary

| ### Public fields |
|---|---|
| `final boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#released()` Whether the player is released |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#FakePlayer(kotlin.Int,kotlin.Boolean,kotlin.collections.List,kotlin.Float,androidx.media3.common.TrackSelectionParameters,kotlin.Long)( @https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState, boolean playWhenReady, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData> playlist, float playbackSpeed, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters trackSelectionParameters, long bufferingDelayMs )` |

| ### Public methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#addCommands(kotlin.IntArray)(int... commands)` Add commands to those already available to the player. |
| `final https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#getVideoOutput()()` Current video output |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#removeCommands(kotlin.IntArray)(int... commands)` Remove commands from those already available to the player. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#renderFirstFrame(kotlin.Boolean)(boolean newlyRenderedFirstFrame)` Sets 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 void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setBufferedPositionMs(kotlin.Long)(long bufferedPositionMs)` Sets the buffered content playback position in milliseconds. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setCurrentAd(kotlin.Int,kotlin.Int)(int adGroupIndex, int adIndexInAdGroup)` Sets the current ad being played. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setCurrentCues(androidx.media3.common.text.CueGroup)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/text/CueGroup cues)` Sets the current cues. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setCurrentCues(androidx.media3.common.text.CueGroup)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/text/CueGroup cues)` Sets the current cues. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setDeviceInfo(androidx.media3.common.DeviceInfo)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/DeviceInfo deviceInfo)` Sets the `https://developer.android.com/reference/androidx/media3/common/DeviceInfo` of the player. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setDeviceInfo(androidx.media3.common.DeviceInfo)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/DeviceInfo deviceInfo)` Sets the `https://developer.android.com/reference/androidx/media3/common/DeviceInfo` of the player. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setDuration(kotlin.Any,kotlin.Long)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html uid, long durationMs)` Sets the duration of the media item in the playlist, in milliseconds. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlaybackState(kotlin.Int)(@https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState)` Sets the {@linkplain Player.State state} of the player. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlaybackState(kotlin.Int)(@https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState)` Sets the {@linkplain Player.State state} of the player. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlaybackSuppressionReason(kotlin.Int)( @https://developer.android.com/reference/androidx/media3/common/Player.PlaybackSuppressionReason int playbackSuppressionReason )` Sets the playback suppression reason. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlaybackSuppressionReason(kotlin.Int)( @https://developer.android.com/reference/androidx/media3/common/Player.PlaybackSuppressionReason int playbackSuppressionReason )` Sets the playback suppression reason. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlayerError(androidx.media3.common.PlaybackException)(https://developer.android.com/reference/androidx/media3/common/PlaybackException playerError)` Sets the last error that caused playback to fail. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPlayerError(androidx.media3.common.PlaybackException)(https://developer.android.com/reference/androidx/media3/common/PlaybackException playerError)` Sets the last error that caused playback to fail. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPosition(kotlin.Long)(long positionMs)` Sets the current content playback position in milliseconds. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setPositionSupplierDrivenBy(kotlinx.coroutines.test.TestCoroutineScheduler)( @https://developer.android.com/reference/androidx/annotation/NonNull https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-scheduler/index.html testScheduler )` Sets the `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current content playback position using extrapolation. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setSeekBackIncrementMs(kotlin.Long)(long seekBackIncrementMs)` Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekBack()` increment in milliseconds. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setSeekForwardIncrementMs(kotlin.Long)(long seekForwardIncrementMs)` Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekForward()` increment in milliseconds. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setTracks(androidx.media3.common.Tracks)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Tracks tracks)` Sets the `https://developer.android.com/reference/androidx/media3/common/Tracks` of the current media item. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setVideoSize(androidx.media3.common.VideoSize)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/VideoSize videoSize)` Sets the current video size. |
| `final void` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#setVideoSize(androidx.media3.common.VideoSize)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/VideoSize videoSize)` Sets the current video size. |

| ### Protected methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#getState()()` Returns the current `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` of the player. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#getState()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleClearVideoOutput(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html videoOutput)` Handles calls to clear the video output. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handlePrepare()()` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#prepare()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleRelease()()` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#release()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSeek(kotlin.Int,kotlin.Long,kotlin.Int)( int mediaItemIndex, long positionMs, @https://developer.android.com/reference/androidx/media3/common/Player.Command int seekCommand )` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#seekTo(long)` and other seek operations (for example, `https://developer.android.com/reference/androidx/media3/common/Player#seekToNext()`). |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetMediaItems(kotlin.collections.MutableList,kotlin.Int,kotlin.Long)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems, int startIndex, long startPositionMs )` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setMediaItem(androidx.media3.common.MediaItem)` and `https://developer.android.com/reference/androidx/media3/common/Player#setMediaItems(java.util.List<androidx.media3.common.MediaItem>)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetPlayWhenReady(kotlin.Boolean)(boolean playWhenReady)` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlayWhenReady(boolean)`, `https://developer.android.com/reference/androidx/media3/common/Player#play()` and `https://developer.android.com/reference/androidx/media3/common/Player#pause()`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetPlaybackParameters(androidx.media3.common.PlaybackParameters)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/PlaybackParameters playbackParameters )` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlaybackParameters(androidx.media3.common.PlaybackParameters)` or `https://developer.android.com/reference/androidx/media3/common/Player#setPlaybackSpeed(float)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetPlaylistMetadata(androidx.media3.common.MediaMetadata)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaMetadata playlistMetadata)` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlaylistMetadata(androidx.media3.common.MediaMetadata)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetRepeatMode(kotlin.Int)(int repeatMode)` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setRepeatMode(int)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetShuffleModeEnabled(kotlin.Boolean)(boolean shuffleModeEnabled)` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setShuffleModeEnabled(boolean)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters trackSelectionParameters )` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetVideoOutput(kotlin.Any)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html videoOutput)` Handles calls to set the video output. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleSetVolume(kotlin.Float,kotlin.Int)( float volume, @https://developer.android.com/reference/androidx/media3/common/C.VolumeOperationType int volumeOperationType )` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setVolume(float)`. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | `https://developer.android.com/reference/androidx/media3/test/utils/FakePlayer#handleStop()()` Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#stop()`. |

### Inherited fields

From [androidx.media3.common.BasePlayer](https://developer.android.com/reference/androidx/media3/common/BasePlayer) `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Timeline.Window` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#window()`

### Inherited methods

From [androidx.media3.common.BasePlayer](https://developer.android.com/reference/androidx/media3/common/BasePlayer) `final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#addMediaItem(androidx.media3.common.MediaItem)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Adds a media item to the end of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#addMediaItem(int,androidx.media3.common.MediaItem)(int index, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Adds a media item at the given index of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#addMediaItems(java.util.List<androidx.media3.common.MediaItem>)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems)`

Adds a list of media items to the end of the playlist.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#canAdvertiseSession()()`

Returns whether the player can be used to advertise a media session.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#clearMediaItems()()`

Clears the playlist.
`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getBufferedPercentage()()` `final long` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getContentDuration()()` `final long` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentLiveOffset()()` `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentManifest()()` `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/MediaItem` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentMediaItem()()` `final int` `[getCurrentWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentWindowIndex())()`

**This method is deprecated.** Deprecated in Java
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getMediaItemAt(int)(int index)`

Returns the `https://developer.android.com/reference/androidx/media3/common/MediaItem` at the given index.
`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getMediaItemCount()()` `final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getNextMediaItemIndex()()` `final int` `[getNextWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getNextWindowIndex())()`

**This method is deprecated.** Deprecated in Java
`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getPreviousMediaItemIndex()()` `final int` `[getPreviousWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getPreviousWindowIndex())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#hasNextMediaItem()()`

Returns whether a next `https://developer.android.com/reference/androidx/media3/common/MediaItem` exists, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#hasPreviousMediaItem()()`

Returns whether a previous media item exists, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCommandAvailable(int)(@https://developer.android.com/reference/androidx/media3/common/Player.Command @https://developer.android.com/reference/androidx/media3/common/Player.Command int command)`

Returns whether the provided `https://developer.android.com/reference/androidx/media3/common/Player.Command` is available.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemDynamic()()` `final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemLive()()` `final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemSeekable()()` `final boolean` `[isCurrentWindowDynamic](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowDynamic())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `[isCurrentWindowLive](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowLive())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `[isCurrentWindowSeekable](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowSeekable())()`

**This method is deprecated.** Deprecated in Java
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isPlaying()()` `final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#moveMediaItem(int,int)(int currentIndex, int newIndex)`

Moves the media item at the current index to the new index.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#pause()()`

Pauses playback.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#play()()`

Resumes playback as soon as `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackState()` == `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#removeMediaItem(int)(int index)`

Removes the media item at the given index of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#replaceMediaItem(int,androidx.media3.common.MediaItem)(int index, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Replaces the media item at the given index of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekBack()()`

Seeks back in the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` by `https://developer.android.com/reference/androidx/media3/common/Player#getSeekBackIncrement()` milliseconds.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekForward()()`

Seeks forward in the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` by `https://developer.android.com/reference/androidx/media3/common/Player#getSeekForwardIncrement()` milliseconds.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekTo(long)(long positionMs)`

Seeks to a position specified in milliseconds in the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekTo(int,long)(int mediaItemIndex, long positionMs)`

Seeks to a position specified in milliseconds in the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToDefaultPosition()()`

Seeks to the default position associated with the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToDefaultPosition(int)(int mediaItemIndex)`

Seeks to the default position associated with the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToNext()()`

Seeks to a later position in the current or next `https://developer.android.com/reference/androidx/media3/common/MediaItem` (if available).
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToNextMediaItem()()`

Seeks to the default position of the next `https://developer.android.com/reference/androidx/media3/common/MediaItem`, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToPrevious()()`

Seeks to an earlier position in the current or previous `https://developer.android.com/reference/androidx/media3/common/MediaItem` (if available).
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#seekToPreviousMediaItem()()`

Seeks to the default position of the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem` and resets the position to the default position.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem,boolean)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem, boolean resetPosition)`

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem,long)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem, long startPositionMs)`

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems)`

Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem` and resets the position to the default position.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#setPlaybackSpeed(float)(float speed)`

Changes the rate at which playback occurs.
From [androidx.media3.common.SimpleBasePlayer](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer) `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#addListener(androidx.media3.common.Player.Listener)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Player.Listener listener)`

Registers a listener to receive all events from the player.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#addMediaItems(int,java.util.List<androidx.media3.common.MediaItem>)(int index, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems)`

Adds a list of media items at the given index of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#clearVideoSurface()()`

Clears any `https://developer.android.com/reference/android/view/Surface.html`, `https://developer.android.com/reference/android/view/SurfaceHolder.html`, `https://developer.android.com/reference/android/view/SurfaceView.html` or `https://developer.android.com/reference/android/view/TextureView.html` currently set on the player.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#clearVideoSurface(android.view.Surface)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Surface.html surface)`

Clears the `https://developer.android.com/reference/android/view/Surface.html` onto which video is being rendered if it matches the one passed.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#clearVideoSurfaceHolder(android.view.SurfaceHolder)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/SurfaceHolder.html surfaceHolder)`

Clears the `https://developer.android.com/reference/android/view/SurfaceHolder.html` that holds the `https://developer.android.com/reference/android/view/Surface.html` onto which video is being rendered if it matches the one passed.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#clearVideoSurfaceView(android.view.SurfaceView)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/SurfaceView.html surfaceView)`

Clears the `https://developer.android.com/reference/android/view/SurfaceView.html` onto which video is being rendered if it matches the one passed.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#clearVideoTextureView(android.view.TextureView)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/TextureView.html textureView)`

Clears the `https://developer.android.com/reference/android/view/TextureView.html` onto which video is being rendered if it matches the one passed.
`final void` `[decreaseDeviceVolume](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#decreaseDeviceVolume())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#decreaseDeviceVolume(int)` instead.

<br />

`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#decreaseDeviceVolume(int)(@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Decreases the volume of the device.
`final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getApplicationLooper()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/AudioAttributes` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getAudioAttributes()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getAudioSessionId()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Player.Commands` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getAvailableCommands()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getBufferedPosition()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getContentBufferedPosition()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getContentPosition()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentAdGroupIndex()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentAdIndexInAdGroup()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/text/CueGroup` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentCues()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentMediaItemIndex()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentPeriodIndex()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentPosition()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Timeline` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentTimeline()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Tracks` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getCurrentTracks()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/DeviceInfo` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getDeviceInfo()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getDeviceVolume()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getDuration()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getMaxSeekToPreviousPosition()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getMediaMetadata()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaceholderMediaItemData(androidx.media3.common.MediaItem)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Returns the placeholder `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData` used for a new `https://developer.android.com/reference/androidx/media3/common/MediaItem` added to the playlist.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaceholderState(androidx.media3.common.SimpleBasePlayer.State)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State suggestedPlaceholderState
)`

Returns the placeholder state used while a player method is handled asynchronously.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlayWhenReady()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/PlaybackParameters` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaybackParameters()()` `final @https://developer.android.com/reference/androidx/media3/common/Player.State int` `@https://developer.android.com/reference/androidx/media3/common/Player.State
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaybackState()()` `final int` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaybackSuppressionReason()()` `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/PlaybackException` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlayerError()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaylistMetadata()()` `final @https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode int` `@https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getRepeatMode()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getSeekBackIncrement()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getSeekForwardIncrement()()` `final boolean` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getShuffleModeEnabled()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/util/Size` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getSurfaceSize()()` `final long` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getTotalBufferedDuration()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getTrackSelectionParameters()()` `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/VideoSize` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getVideoSize()()` `final float` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getVolume()()` `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleAddMediaItems(int,java.util.List<androidx.media3.common.MediaItem>)(
int index,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems
)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#addMediaItem(androidx.media3.common.MediaItem)` and `https://developer.android.com/reference/androidx/media3/common/Player#addMediaItems(java.util.List<androidx.media3.common.MediaItem>)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleDecreaseDeviceVolume(int)(@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#decreaseDeviceVolume()` and `https://developer.android.com/reference/androidx/media3/common/Player#decreaseDeviceVolume(int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleIncreaseDeviceVolume(int)(@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#increaseDeviceVolume()` and `https://developer.android.com/reference/androidx/media3/common/Player#increaseDeviceVolume(int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleMoveMediaItems(int,int,int)(int fromIndex, int toIndex, int newIndex)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#moveMediaItem(int,int)` and `https://developer.android.com/reference/androidx/media3/common/Player#moveMediaItems(int,int,int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleRemoveMediaItems(int,int)(int fromIndex, int toIndex)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#removeMediaItem(int)` and `https://developer.android.com/reference/androidx/media3/common/Player#removeMediaItems(int,int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleReplaceMediaItems(int,int,java.util.List<androidx.media3.common.MediaItem>)(
int fromIndex,
int toIndex,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems
)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#replaceMediaItem(int,androidx.media3.common.MediaItem)` and `https://developer.android.com/reference/androidx/media3/common/Player#replaceMediaItems(int,int,java.util.List<androidx.media3.common.MediaItem>)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleSetAudioAttributes(androidx.media3.common.AudioAttributes,boolean)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes,
boolean handleAudioFocus
)`

Handles calls to set the audio attributes.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleSetDeviceMuted(boolean,int)(
boolean muted,
@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags
)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceMuted(boolean)` and `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceMuted(boolean,int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleSetDeviceVolume(int,int)(
@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int deviceVolume,
@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags
)`

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceVolume(int)` and `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceVolume(int,int)`.
`@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
[handleSetVolume](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleSetVolume(float))(@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0, to = 1.0) float volume)`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#handleSetVolume(float,int)` instead.

<br />

`final void` `[increaseDeviceVolume](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#increaseDeviceVolume())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#increaseDeviceVolume(int)` instead.

<br />

`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#increaseDeviceVolume(int)(@https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Increases the volume of the device.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#invalidateState()()`

Invalidates the current state.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#isDeviceMuted()()` `final boolean` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#isLoading()()` `final boolean` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#isPlayingAd()()` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#moveMediaItems(int,int,int)(int fromIndex, int toIndex, int newIndex)`

Moves the media item range to the new index.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#mute()()`

Sets the audio volume to 0.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#prepare()()`

Prepares the player.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#release()()`

Releases the player.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#removeListener(androidx.media3.common.Player.Listener)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Player.Listener listener)`

Unregister a listener registered through `https://developer.android.com/reference/androidx/media3/common/Player#addListener(androidx.media3.common.Player.Listener)`.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#removeMediaItems(int,int)(int fromIndex, int toIndex)`

Removes a range of media items from the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#replaceMediaItems(int,int,java.util.List<androidx.media3.common.MediaItem>)(
int fromIndex,
int toIndex,
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems
)`

Replaces the media items at the given range of the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#seekTo(int,long,int,boolean)(
int mediaItemIndex,
long positionMs,
@https://developer.android.com/reference/androidx/media3/common/Player.Command @https://developer.android.com/reference/androidx/media3/common/Player.Command int seekCommand,
boolean isRepeatingCurrentItem
)`

Seeks to a position in the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setAudioAttributes(androidx.media3.common.AudioAttributes,boolean)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes,
boolean handleAudioFocus
)`

Sets the attributes for audio playback, used by the underlying audio track.
`final void` `[setDeviceMuted](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setDeviceMuted(boolean))(boolean muted)`

**This method is deprecated.** Deprecated in Java
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setDeviceMuted(boolean,int)(boolean muted, @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Sets the mute state of the device.
`final void` `[setDeviceVolume](https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setDeviceVolume(int))(int volume)`

**This method is deprecated.** Deprecated in Java
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setDeviceVolume(int,int)(int volume, @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Sets the volume of the device with volume flags.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>,boolean)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems,
boolean resetPosition
)`

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>,int,long)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems,
int startIndex,
long startPositionMs
)`

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setPlayWhenReady(boolean)(boolean playWhenReady)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setPlaybackParameters(androidx.media3.common.PlaybackParameters)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/PlaybackParameters playbackParameters)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setPlaylistMetadata(androidx.media3.common.MediaMetadata)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaMetadata mediaMetadata)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setRepeatMode(int)(@https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode @https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode int repeatMode)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setShuffleModeEnabled(boolean)(boolean shuffleModeEnabled)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters parameters
)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setVideoSurface(android.view.Surface)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Surface.html surface)`

Sets the `https://developer.android.com/reference/android/view/Surface.html` onto which video will be rendered.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setVideoSurfaceHolder(android.view.SurfaceHolder)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/SurfaceHolder.html surfaceHolder)`

Sets the `https://developer.android.com/reference/android/view/SurfaceHolder.html` that holds the `https://developer.android.com/reference/android/view/Surface.html` onto which video will be rendered.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setVideoSurfaceView(android.view.SurfaceView)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/SurfaceView.html surfaceView)`

Sets the `https://developer.android.com/reference/android/view/SurfaceView.html` onto which video will be rendered.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setVideoTextureView(android.view.TextureView)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/TextureView.html textureView)`

Sets the `https://developer.android.com/reference/android/view/TextureView.html` onto which video will be rendered.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#setVolume(float)(float volume)` `final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#stop()()`

Stops playback without resetting the playlist.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#unmute()()`

If the audio volume is 0, sets the audio volume to a non-zero value decided by the Player to be the most appropriate.
`final void` `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#verifyApplicationThread()()`

Throws an `https://developer.android.com/reference/java/lang/IllegalStateException.html` if the the thread calling this method does not match the `https://developer.android.com/reference/android/os/Looper.html` thread that was specified upon construction of this instance.

## Public fields

### released

```
public final boolean released
```

Whether the player is released

## Public constructors

### FakePlayer

```
public FakePlayer(
    @Player.State int playbackState,
    boolean playWhenReady,
    @NonNull List<@NonNull SimpleBasePlayer.MediaItemData> playlist,
    float playbackSpeed,
    @NonNull TrackSelectionParameters trackSelectionParameters,
    long bufferingDelayMs
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState` | The initial playback state of the player. |
| `boolean playWhenReady` | Whether playback should start automatically when ready. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData> playlist` | The initial list of media items to play. |
| `float playbackSpeed` | The initial playback speed. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters trackSelectionParameters` | The initial track selection parameters. |
| `long bufferingDelayMs` | The time spent in Player#STATE_BUFFERING when preparing or seeking, in milliseconds. A value of zero will result in the player transitioning directly to Player#STATE_READY without entering Player#STATE_BUFFERING. Must not be negative. |

## Public methods

### addCommands

```
public final void addCommands(int... commands)
```

Add commands to those already available to the player.

### getVideoOutput

```
public final Object getVideoOutput()
```

Current video output

### removeCommands

```
public final void removeCommands(int... commands)
```

Remove commands from those already available to the player.

### renderFirstFrame

```
public final void renderFirstFrame(boolean newlyRenderedFirstFrame)
```

Sets 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.

### setBufferedPositionMs

```
public final void setBufferedPositionMs(long bufferedPositionMs)
```

Sets the buffered content playback position in milliseconds.

| Parameters |
|---|---|
| `long bufferedPositionMs` | The buffered content playback position in milliseconds. |

### setCurrentAd

```
public final void setCurrentAd(int adGroupIndex, int adIndexInAdGroup)
```

Sets the current ad being played.

| Parameters |
|---|---|
| `int adGroupIndex` | The index of the ad group being played. |
| `int adIndexInAdGroup` | The index of the ad within the ad group being played. |

### setCurrentCues

```
public final void setCurrentCues(@NonNull CueGroup cues)
```

Sets the current cues.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/text/CueGroup cues` | The current cues. |

### setCurrentCues

```
public final void setCurrentCues(@NonNull CueGroup cues)
```

Sets the current cues.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/text/CueGroup cues` | The current cues. |

### setDeviceInfo

```
public final void setDeviceInfo(@NonNull DeviceInfo deviceInfo)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/DeviceInfo` of the player.

### setDeviceInfo

```
public final void setDeviceInfo(@NonNull DeviceInfo deviceInfo)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/DeviceInfo` of the player.

### setDuration

```
public final void setDuration(@NonNull Object uid, long durationMs)
```

Sets the duration of the media item in the playlist, in milliseconds.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html uid` | Unique id of the media item whose duration is being set, or its `https://developer.android.com/reference/androidx/media3/common/MediaItem#mediaId()` if the item was added without an explicit `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData#uid()`. |
| `long durationMs` | The duration of the media item, in milliseconds, or {@link C#TIME_UNSET} if unknown. |

### setPlaybackState

```
public final void setPlaybackState(@Player.State int playbackState)
```

Sets the {@linkplain Player.State state} of the player.

If the playlist is empty, the state must be either `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_ENDED()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState` | The `https://developer.android.com/reference/androidx/media3/common/Player.State` of the player. |

### setPlaybackState

```
public final void setPlaybackState(@Player.State int playbackState)
```

Sets the {@linkplain Player.State state} of the player.

If the playlist is empty, the state must be either `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_ENDED()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Player.State int playbackState` | The `https://developer.android.com/reference/androidx/media3/common/Player.State` of the player. |

### setPlaybackSuppressionReason

```
public final void setPlaybackSuppressionReason(
    @Player.PlaybackSuppressionReason int playbackSuppressionReason
)
```

Sets the playback suppression reason.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Player.PlaybackSuppressionReason int playbackSuppressionReason` | The playback suppression reason. |

### setPlaybackSuppressionReason

```
public final void setPlaybackSuppressionReason(
    @Player.PlaybackSuppressionReason int playbackSuppressionReason
)
```

Sets the playback suppression reason.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Player.PlaybackSuppressionReason int playbackSuppressionReason` | The playback suppression reason. |

### setPlayerError

```
public final void setPlayerError(PlaybackException playerError)
```

Sets the last error that caused playback to fail.

Note that the player's state must be `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()` when an error is set. If an error is provided and the player is not currently in `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()`, this method will automatically update the playback state to `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/PlaybackException playerError` | The last error that caused playback to fail, or null if there is no error. |

### setPlayerError

```
public final void setPlayerError(PlaybackException playerError)
```

Sets the last error that caused playback to fail.

Note that the player's state must be `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()` when an error is set. If an error is provided and the player is not currently in `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()`, this method will automatically update the playback state to `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/PlaybackException playerError` | The last error that caused playback to fail, or null if there is no error. |

### setPosition

```
public final void setPosition(long positionMs)
```

Sets the current content playback position in milliseconds.

| Parameters |
|---|---|
| `long positionMs` | The current content playback position in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to indicate the default start position. |

### setPositionSupplierDrivenBy

```
public final void setPositionSupplierDrivenBy(
    @NonNull TestCoroutineScheduler testScheduler
)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current content playback position using extrapolation. Start and elapsed time are measured using the `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-test/kotlinx.coroutines.test/-test-coroutine-scheduler/index.html`, and playback speed is taken into account.

Note, that this approach only works

- for a single media item (does not consider current item's duration and playlist length)

- assuming the Player is playing (does not react to pauses and discontinuities)

- assuming the playback speed does not change after the supplier is set

### setSeekBackIncrementMs

```
public final void setSeekBackIncrementMs(long seekBackIncrementMs)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekBack()` increment in milliseconds.

| Parameters |
|---|---|
| `long seekBackIncrementMs` | The `https://developer.android.com/reference/androidx/media3/common/Player#seekBack()` increment in milliseconds. |

### setSeekForwardIncrementMs

```
public final void setSeekForwardIncrementMs(long seekForwardIncrementMs)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekForward()` increment in milliseconds.

| Parameters |
|---|---|
| `long seekForwardIncrementMs` | The `https://developer.android.com/reference/androidx/media3/common/Player#seekForward()` increment in milliseconds. |

### setTracks

```
public final void setTracks(@NonNull Tracks tracks)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/Tracks` of the current media item.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/Tracks tracks` | The `https://developer.android.com/reference/androidx/media3/common/Tracks` to set. |

### setVideoSize

```
public final void setVideoSize(@NonNull VideoSize videoSize)
```

Sets the current video size.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/VideoSize videoSize` | The current video size. |

### setVideoSize

```
public final void setVideoSize(@NonNull VideoSize videoSize)
```

Sets the current video size.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/VideoSize videoSize` | The current video size. |

## Protected methods

### getState

```
protected @NonNull SimpleBasePlayer.State getState()
```

Returns the current `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` of the player.

The `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` should include all `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State.Builder#setAvailableCommands(androidx.media3.common.Player.Commands)` indicating which player methods are allowed to be called.

Note that this method won't be called while asynchronous handling of player methods is in progress. This means that the implementation doesn't need to handle state changes caused by these asynchronous operations until they are done and can return the currently known state directly. The placeholder state used while these asynchronous operations are in progress can be customized by overriding `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer#getPlaceholderState(androidx.media3.common.SimpleBasePlayer.State)` if required.

### getState

```
protected @NonNull SimpleBasePlayer.State getState()
```

### handleClearVideoOutput

```
protected @NonNull ListenableFuture<@NonNull ?> handleClearVideoOutput(Object videoOutput)
```

Handles calls to clear the video output.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_VIDEO_SURFACE()` is available.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html videoOutput` | The video output to clear. If null any current output should be cleared. If non-null, the output should only be cleared if it matches the provided argument. This is either a `https://developer.android.com/reference/android/view/Surface.html`, `https://developer.android.com/reference/android/view/SurfaceHolder.html`, `https://developer.android.com/reference/android/view/TextureView.html` or `https://developer.android.com/reference/android/view/SurfaceView.html`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handlePrepare

```
protected @NonNull ListenableFuture<@NonNull ?> handlePrepare()
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#prepare()`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_PREPARE()` is available.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleRelease

```
protected @NonNull ListenableFuture<@NonNull ?> handleRelease()
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#release()`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_RELEASE()` is available.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSeek

```
protected @NonNull ListenableFuture<@NonNull ?> handleSeek(
    int mediaItemIndex,
    long positionMs,
    @Player.Command int seekCommand
)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#seekTo(long)` and other seek operations (for example, `https://developer.android.com/reference/androidx/media3/common/Player#seekToNext()`).

Will only be called if the appropriate `https://developer.android.com/reference/androidx/media3/common/Player.Command`, for example `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_MEDIA_ITEM()` or `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT()`, is available.

| Parameters |
|---|---|
| `int mediaItemIndex` | The media item index to seek to. If the original seek operation did not directly specify an index, this is the most likely implied index based on the available player state. If the implied action is to do nothing, this will be `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()`. |
| `long positionMs` | The position in milliseconds to start playback from, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to start at the default position in the media item. If the original seek operation did not directly specify a position, this is the most likely implied position based on the available player state. |
| `@https://developer.android.com/reference/androidx/media3/common/Player.Command int seekCommand` | The `https://developer.android.com/reference/androidx/media3/common/Player.Command` used to trigger the seek. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetMediaItems

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetMediaItems(
    @NonNull List<@NonNull MediaItem> mediaItems,
    int startIndex,
    long startPositionMs
)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setMediaItem(androidx.media3.common.MediaItem)` and `https://developer.android.com/reference/androidx/media3/common/Player#setMediaItems(java.util.List<androidx.media3.common.MediaItem>)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEM()` or `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_CHANGE_MEDIA_ITEMS()` is available. If only `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEM()` is available, the list of media items will always contain exactly one item.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaItem> mediaItems` | The media items to add. |
| `int startIndex` | The index at which to start playback from, or `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()` to start at the default item. |
| `long startPositionMs` | The position in milliseconds to start playback from, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` to start at the default position in the media item. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlayWhenReady

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetPlayWhenReady(boolean playWhenReady)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlayWhenReady(boolean)`, `https://developer.android.com/reference/androidx/media3/common/Player#play()` and `https://developer.android.com/reference/androidx/media3/common/Player#pause()`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_PLAY_PAUSE()` is available.

| Parameters |
|---|---|
| `boolean playWhenReady` | The requested `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State#playWhenReady()` |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlaybackParameters

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetPlaybackParameters(
    @NonNull PlaybackParameters playbackParameters
)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlaybackParameters(androidx.media3.common.PlaybackParameters)` or `https://developer.android.com/reference/androidx/media3/common/Player#setPlaybackSpeed(float)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_SPEED_AND_PITCH()` is available.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/PlaybackParameters playbackParameters` | The requested `https://developer.android.com/reference/androidx/media3/common/PlaybackParameters`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlaylistMetadata

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetPlaylistMetadata(@NonNull MediaMetadata playlistMetadata)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setPlaylistMetadata(androidx.media3.common.MediaMetadata)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_PLAYLIST_METADATA()` is available.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/MediaMetadata playlistMetadata` | The requested `https://developer.android.com/reference/androidx/media3/common/MediaMetadata`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetRepeatMode

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetRepeatMode(int repeatMode)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setRepeatMode(int)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_REPEAT_MODE()` is available.

| Parameters |
|---|---|
| `int repeatMode` | The requested `https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetShuffleModeEnabled

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetShuffleModeEnabled(boolean shuffleModeEnabled)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setShuffleModeEnabled(boolean)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_SHUFFLE_MODE()` is available.

| Parameters |
|---|---|
| `boolean shuffleModeEnabled` | Whether shuffle mode was requested to be enabled. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetTrackSelectionParameters

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetTrackSelectionParameters(
    @NonNull TrackSelectionParameters trackSelectionParameters
)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_TRACK_SELECTION_PARAMETERS()` is available.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters trackSelectionParameters` | The requested `https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetVideoOutput

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetVideoOutput(@NonNull Object videoOutput)
```

Handles calls to set the video output.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_VIDEO_SURFACE()` is available.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Object.html videoOutput` | The requested video output. This is either a `https://developer.android.com/reference/android/view/Surface.html`, `https://developer.android.com/reference/android/view/SurfaceHolder.html`, `https://developer.android.com/reference/android/view/TextureView.html` or `https://developer.android.com/reference/android/view/SurfaceView.html`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetVolume

```
protected @NonNull ListenableFuture<@NonNull ?> handleSetVolume(
    float volume,
    @C.VolumeOperationType int volumeOperationType
)
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#setVolume(float)`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_VOLUME()` is available.

| Parameters |
|---|---|
| `float volume` | The requested audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |
| `@https://developer.android.com/reference/androidx/media3/common/C.VolumeOperationType int volumeOperationType` | The `https://developer.android.com/reference/androidx/media3/common/C.VolumeOperationType` that corresponds to the original command for changing of the volume. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleStop

```
protected @NonNull ListenableFuture<@NonNull ?> handleStop()
```

Handles calls to `https://developer.android.com/reference/androidx/media3/common/Player#stop()`.

Will only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_STOP()` is available.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>` | A `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html` indicating the completion of all immediate `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |