# 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
class FakePlayer : SimpleBasePlayer
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.media3.common.BasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer) |||
|   | ↳ | [androidx.media3.common.SimpleBasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer) ||
|   |   | ↳ | [androidx.media3.test.utils.FakePlayer](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakePlayer) |

*** ** * ** ***

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

## Summary

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

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

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

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakePlayer#released()` Whether the player is released |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakePlayer#videoOutput()` Current video output |

| ### Protected properties |
|---|---|
| `open https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State` | `https://developer.android.com/reference/kotlin/androidx/media3/test/utils/FakePlayer#state()` |

### Inherited functions

From [androidx.media3.common.BasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#addMediaItem(androidx.media3.common.MediaItem)(mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`

Adds a media item to the end of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#addMediaItem(int,androidx.media3.common.MediaItem)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`

Adds a media item at the given index of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#addMediaItems(java.util.List<androidx.media3.common.MediaItem>)(mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>)`

Adds a list of media items to the end of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#canAdvertiseSession()()`

Returns whether the player can be used to advertise a media session.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#clearMediaItems()()`

Clears the playlist.
`https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#getMediaItemAt(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` at the given index.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#hasNextMediaItem()()`

Returns whether a next `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` exists, which may depend on the current repeat mode and whether shuffle mode is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCommandAvailable(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command command: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns whether the provided `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` is available.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#moveMediaItem(int,int)(currentIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, newIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Moves the media item at the current index to the new index.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#pause()()`

Pauses playback.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#play()()`

Resumes playback as soon as `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackState()` == `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#STATE_READY()`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#removeMediaItem(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Removes the media item at the given index of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#replaceMediaItem(int,androidx.media3.common.MediaItem)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`

Replaces the media item at the given index of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekBack()()`

Seeks back in the current `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` by `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getSeekBackIncrement()` milliseconds.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekForward()()`

Seeks forward in the current `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` by `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getSeekForwardIncrement()` milliseconds.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekTo(long)(positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Seeks to a position specified in milliseconds in the current `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekTo(int,long)(mediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Seeks to a position specified in milliseconds in the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToDefaultPosition()()`

Seeks to the default position associated with the current `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToDefaultPosition(int)(mediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Seeks to the default position associated with the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToNext()()`

Seeks to a later position in the current or next `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` (if available).
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToNextMediaItem()()`

Seeks to the default position of the next `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`, which may depend on the current repeat mode and whether shuffle mode is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToPrevious()()`

Seeks to an earlier position in the current or previous `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` (if available).
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToPreviousMediaItem()()`

Seeks to the default position of the previous `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`, which may depend on the current repeat mode and whether shuffle mode is enabled.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem)(mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`

Clears the playlist, adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` and resets the position to the default position.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem,boolean)(mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem, resetPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Clears the playlist and adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#setMediaItem(androidx.media3.common.MediaItem,long)(mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem, startPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Clears the playlist and adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>)(mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>)`

Clears the playlist, adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem` and resets the position to the default position.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#setPlaybackSpeed(float)(speed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`

Changes the rate at which playback occurs.
From [androidx.media3.common.SimpleBasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#addListener(androidx.media3.common.Player.Listener)(listener: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener)`

Registers a listener to receive all events from the player.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#addMediaItems(int,java.util.List<androidx.media3.common.MediaItem>)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>)`

Adds a list of media items at the given index of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#clearVideoSurface(android.view.Surface)(surface: https://developer.android.com/reference/android/view/Surface.html?)`

Clears the `https://developer.android.com/reference/android/view/Surface.html` onto which video is being rendered if it matches the one passed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#clearVideoSurfaceHolder(android.view.SurfaceHolder)(surfaceHolder: https://developer.android.com/reference/android/view/SurfaceHolder.html?)`

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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#clearVideoSurfaceView(android.view.SurfaceView)(surfaceView: https://developer.android.com/reference/android/view/SurfaceView.html?)`

Clears the `https://developer.android.com/reference/android/view/SurfaceView.html` onto which video is being rendered if it matches the one passed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#clearVideoTextureView(android.view.TextureView)(textureView: https://developer.android.com/reference/android/view/TextureView.html?)`

Clears the `https://developer.android.com/reference/android/view/TextureView.html` onto which video is being rendered if it matches the one passed.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[decreaseDeviceVolume](https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#decreaseDeviceVolume())()`

**This function is deprecated.**

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

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#decreaseDeviceVolume(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags flags: @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Decreases the volume of the device.
`https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#getPlaceholderMediaItemData(androidx.media3.common.MediaItem)(mediaItem: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`

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

Returns the placeholder state used while a player method is handled asynchronously.
`https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` `@https://checkerframework.org/api/com/google/errorprone/annotations/ForOverride.html
https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#handleAddMediaItems(int,java.util.List<androidx.media3.common.MediaItem>)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>)`

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

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

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

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

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

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

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

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

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

**This function is deprecated.**

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

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `[increaseDeviceVolume](https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#increaseDeviceVolume())()`

**This function is deprecated.**

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

<br />

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#increaseDeviceVolume(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags flags: @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Increases the volume of the device.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#invalidateState()()`

Invalidates the current state.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#moveMediaItems(int,int,int)(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, newIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Moves the media item range to the new index.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#mute()()`

Sets the audio volume to 0.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#prepare()()`

Prepares the player.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#release()()`

Releases the player.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#removeListener(androidx.media3.common.Player.Listener)(listener: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener)`

Unregister a listener registered through `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#addListener(androidx.media3.common.Player.Listener)`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#removeMediaItems(int,int)(fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Removes a range of media items from the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#replaceMediaItems(int,int,java.util.List<androidx.media3.common.MediaItem>)(
fromIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
toIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>
)`

Replaces the media items at the given range of the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#seekTo(int,long,int,boolean)(
mediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html,
@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command seekCommand: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
isRepeatingCurrentItem: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)`

Seeks to a position in the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setAudioAttributes(androidx.media3.common.AudioAttributes,boolean)(
audioAttributes: https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes,
handleAudioFocus: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html
)`

Sets the attributes for audio playback, used by the underlying audio track.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setDeviceMuted(boolean,int)(muted: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags flags: @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the mute state of the device.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setDeviceVolume(int,int)(volume: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags flags: @https://developer.android.com/reference/kotlin/androidx/media3/common/C.VolumeFlags https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Sets the volume of the device with volume flags.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>,boolean)(mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>, resetPosition: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Clears the playlist and adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setMediaItems(java.util.List<androidx.media3.common.MediaItem>,int,long)(
mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>,
startIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
startPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html
)`

Clears the playlist and adds the specified `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem`.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setVideoSurface(android.view.Surface)(surface: https://developer.android.com/reference/android/view/Surface.html?)`

Sets the `https://developer.android.com/reference/android/view/Surface.html` onto which video will be rendered.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setVideoSurfaceHolder(android.view.SurfaceHolder)(surfaceHolder: https://developer.android.com/reference/android/view/SurfaceHolder.html?)`

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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setVideoSurfaceView(android.view.SurfaceView)(surfaceView: https://developer.android.com/reference/android/view/SurfaceView.html?)`

Sets the `https://developer.android.com/reference/android/view/SurfaceView.html` onto which video will be rendered.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#setVideoTextureView(android.view.TextureView)(textureView: https://developer.android.com/reference/android/view/TextureView.html?)`

Sets the `https://developer.android.com/reference/android/view/TextureView.html` onto which video will be rendered.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#stop()()`

Stops playback without resetting the playlist.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/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.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/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.

### Inherited properties

From [androidx.media3.common.BasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#bufferedPercentage()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#contentDuration()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#currentLiveOffset()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#currentManifest()` `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem?` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#currentMediaItem()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#currentWindowIndex()`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentMediaItemDynamic()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentMediaItemLive()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentMediaItemSeekable()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentWindowDynamic()`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentWindowLive()`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isCurrentWindowSeekable()`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#isPlaying()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#mediaItemCount()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#nextMediaItemIndex()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#nextWindowIndex()`

**This property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#previousMediaItemIndex()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#previousWindowIndex()`

**This property is deprecated.** Deprecated in Java
`https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline.Window` `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#window()` From [androidx.media3.common.SimpleBasePlayer](https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer) `https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#applicationLooper()` `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#audioAttributes()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#audioSessionId()` `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#availableCommands()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#bufferedPosition()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#contentBufferedPosition()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#contentPosition()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentAdGroupIndex()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentAdIndexInAdGroup()` `https://developer.android.com/reference/kotlin/androidx/media3/common/text/CueGroup` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentCues()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentMediaItemIndex()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentPeriodIndex()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentPosition()` `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentTimeline()` `https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#currentTracks()` `https://developer.android.com/reference/kotlin/androidx/media3/common/DeviceInfo` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#deviceInfo()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#deviceVolume()`

**The setter for this property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#duration()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#isDeviceMuted()`

**The setter for this property is deprecated.** Deprecated in Java
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#isLoading()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#isPlayingAd()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#maxSeekToPreviousPosition()` `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#mediaMetadata()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playWhenReady()` `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackParameters` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playbackParameters()` `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playbackState()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playbackSuppressionReason()` `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException?` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playerError()` `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#playlistMetadata()` `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#repeatMode()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#seekBackIncrement()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#seekForwardIncrement()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#shuffleModeEnabled()` `https://developer.android.com/reference/kotlin/androidx/media3/common/util/Size` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#surfaceSize()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#totalBufferedDuration()` `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#trackSelectionParameters()` `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoSize` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#videoSize()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#volume()`

## Public constructors

### FakePlayer

```
FakePlayer(
    playbackState: @Player.State Int = STATE_IDLE,
    playWhenReady: Boolean = false,
    playlist: List<SimpleBasePlayer.MediaItemData> = ImmutableList.of(),
    playbackSpeed: Float = 1.0f,
    trackSelectionParameters: TrackSelectionParameters = TrackSelectionParameters.DEFAULT,
    bufferingDelayMs: Long = 100
)
```

| Parameters |
|---|---|
| `playbackState: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = STATE_IDLE` | The initial playback state of the player. |
| `playWhenReady: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | Whether playback should start automatically when ready. |
| `playlist: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData> = ImmutableList.of()` | The initial list of media items to play. |
| `playbackSpeed: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | The initial playback speed. |
| `trackSelectionParameters: https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters = TrackSelectionParameters.DEFAULT` | The initial track selection parameters. |
| `bufferingDelayMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 100` | 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 functions

### addCommands

```
fun addCommands(vararg commands: Int): Unit
```

Add commands to those already available to the player.

### removeCommands

```
fun removeCommands(vararg commands: Int): Unit
```

Remove commands from those already available to the player.

### renderFirstFrame

```
fun renderFirstFrame(newlyRenderedFirstFrame: Boolean): Unit
```

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

```
fun setBufferedPositionMs(bufferedPositionMs: Long): Unit
```

Sets the buffered content playback position in milliseconds.

| Parameters |
|---|---|
| `bufferedPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The buffered content playback position in milliseconds. |

### setCurrentAd

```
fun setCurrentAd(adGroupIndex: Int, adIndexInAdGroup: Int): Unit
```

Sets the current ad being played.

| Parameters |
|---|---|
| `adGroupIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the ad group being played. |
| `adIndexInAdGroup: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the ad within the ad group being played. |

### setCurrentCues

```
fun setCurrentCues(cues: CueGroup): Unit
```

Sets the current cues.

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

### setDeviceInfo

```
fun setDeviceInfo(deviceInfo: DeviceInfo): Unit
```

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

### setDuration

```
fun setDuration(uid: Any, durationMs: Long): Unit
```

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

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

### setPlaybackState

```
fun setPlaybackState(playbackState: @Player.State Int): Unit
```

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

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

| Parameters |
|---|---|
| `playbackState: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State` of the player. |

### setPlaybackSuppressionReason

```
fun setPlaybackSuppressionReason(
    playbackSuppressionReason: @Player.PlaybackSuppressionReason Int
): Unit
```

Sets the playback suppression reason.

| Parameters |
|---|---|
| `playbackSuppressionReason: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlaybackSuppressionReason https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The playback suppression reason. |

### setPlayerError

```
fun setPlayerError(playerError: PlaybackException?): Unit
```

Sets the last error that caused playback to fail.

Note that the player's state must be `https://developer.android.com/reference/kotlin/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/kotlin/androidx/media3/common/Player#STATE_IDLE()`, this method will automatically update the playback state to `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#STATE_IDLE()`.

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

### setPosition

```
fun setPosition(positionMs: Long): Unit
```

Sets the current content playback position in milliseconds.

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

### setPositionSupplierDrivenBy

```
fun setPositionSupplierDrivenBy(testScheduler: TestCoroutineScheduler): Unit
```

Sets the `https://developer.android.com/reference/kotlin/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

```
fun setSeekBackIncrementMs(seekBackIncrementMs: Long): Unit
```

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

| Parameters |
|---|---|
| `seekBackIncrementMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#seekBack()` increment in milliseconds. |

### setSeekForwardIncrementMs

```
fun setSeekForwardIncrementMs(seekForwardIncrementMs: Long): Unit
```

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

| Parameters |
|---|---|
| `seekForwardIncrementMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#seekForward()` increment in milliseconds. |

### setTracks

```
fun setTracks(tracks: Tracks): Unit
```

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

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

### setVideoSize

```
fun setVideoSize(videoSize: VideoSize): Unit
```

Sets the current video size.

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

## Protected functions

### getState

```
protected open fun getState(): SimpleBasePlayer.State
```

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

The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State` should include all `https://developer.android.com/reference/kotlin/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/kotlin/androidx/media3/common/SimpleBasePlayer#getPlaceholderState(androidx.media3.common.SimpleBasePlayer.State)` if required.

### handleClearVideoOutput

```
protected open fun handleClearVideoOutput(videoOutput: Any?): ListenableFuture<*>
```

Handles calls to clear the video output.

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

| Parameters |
|---|---|
| `videoOutput: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | 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://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handlePrepare

```
protected open fun handlePrepare(): ListenableFuture<*>
```

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleRelease

```
protected open fun handleRelease(): ListenableFuture<*>
```

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSeek

```
protected open fun handleSeek(
    mediaItemIndex: Int,
    positionMs: Long,
    seekCommand: @Player.Command Int
): ListenableFuture<*>
```

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

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

| Parameters |
|---|---|
| `mediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | 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/kotlin/androidx/media3/common/C#INDEX_UNSET()`. |
| `positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The position in milliseconds to start playback from, or `https://developer.android.com/reference/kotlin/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. |
| `seekCommand: @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` used to trigger the seek. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetMediaItems

```
protected open fun handleSetMediaItems(
    mediaItems: MutableList<MediaItem>,
    startIndex: Int,
    startPositionMs: Long
): ListenableFuture<*>
```

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

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

| Parameters |
|---|---|
| `mediaItems: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem>` | The media items to add. |
| `startIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index at which to start playback from, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` to start at the default item. |
| `startPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The position in milliseconds to start playback from, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` to start at the default position in the media item. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlayWhenReady

```
protected open fun handleSetPlayWhenReady(playWhenReady: Boolean): ListenableFuture<*>
```

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

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

| Parameters |
|---|---|
| `playWhenReady: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | The requested `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State#playWhenReady()` |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlaybackParameters

```
protected open fun handleSetPlaybackParameters(playbackParameters: PlaybackParameters): ListenableFuture<*>
```

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

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetPlaylistMetadata

```
protected open fun handleSetPlaylistMetadata(playlistMetadata: MediaMetadata): ListenableFuture<*>
```

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

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetRepeatMode

```
protected open fun handleSetRepeatMode(repeatMode: Int): ListenableFuture<*>
```

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

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

| Parameters |
|---|---|
| `repeatMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The requested `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode`. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetShuffleModeEnabled

```
protected open fun handleSetShuffleModeEnabled(shuffleModeEnabled: Boolean): ListenableFuture<*>
```

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

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

| Parameters |
|---|---|
| `shuffleModeEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether shuffle mode was requested to be enabled. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetTrackSelectionParameters

```
protected open fun handleSetTrackSelectionParameters(
    trackSelectionParameters: TrackSelectionParameters
): ListenableFuture<*>
```

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

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetVideoOutput

```
protected open fun handleSetVideoOutput(videoOutput: Any): ListenableFuture<*>
```

Handles calls to set the video output.

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

| Parameters |
|---|---|
| `videoOutput: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html` | 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://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleSetVolume

```
protected open fun handleSetVolume(
    volume: Float,
    volumeOperationType: @C.VolumeOperationType Int
): ListenableFuture<*>
```

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

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

### handleStop

```
protected open fun handleStop(): ListenableFuture<*>
```

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

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

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html<*>` | 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/kotlin/androidx/media3/common/SimpleBasePlayer.State` changes caused by this call. |

## Public properties

### released

```
var released: Boolean
```

Whether the player is released

### videoOutput

```
val videoOutput: Any?
```

Current video output

## Protected properties

### state

```
protected open val state: SimpleBasePlayer.State
```