# SimpleBasePlayer.State.Builder

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/SimpleBasePlayer.java+class:androidx.media3.common.SimpleBasePlayer.State.Builder)

*** ** * ** ***


```
class SimpleBasePlayer.State.Builder
```

<br />

*** ** * ** ***

A builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State` objects.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#Builder()()` Creates the builder. |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#build()()` Builds the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#clearPositionDiscontinuity()()` Clears a previously set position discontinuity signal. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdBufferedPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)( adBufferedPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing ad is buffered, in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)( adPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current ad playback position in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdPositionMs(long)(positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the current ad playback position in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAudioAttributes(androidx.media3.common.AudioAttributes)(audioAttributes: https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes!)` Sets the current `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAudioSessionId(int)(audioSessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the current audio session ID. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAvailableCommands(androidx.media3.common.Player.Commands)(availableCommands: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands!)` Sets the available `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setContentBufferedPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)( contentBufferedPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing content is buffered, in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setContentPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)( contentPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current content playback position in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setContentPositionMs(long)(positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the current content playback position in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentAd(int,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 indices, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no ad is playing. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentCues(androidx.media3.common.text.CueGroup)(currentCues: https://developer.android.com/reference/kotlin/androidx/media3/common/text/CueGroup!)` Sets the current `https://developer.android.com/reference/kotlin/androidx/media3/common/text/CueGroup`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentMediaItemIndex(int)(currentMediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the current media item index. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#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`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setDeviceVolume(int)(deviceVolume: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the current device volume. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setIsDeviceMuted(boolean)(isDeviceMuted: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether the device is muted. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setIsLoading(boolean)(isLoading: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether the player is currently loading its source. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setMaxSeekToPreviousPositionMs(long)(maxSeekToPreviousPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the maximum position for which `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToPrevious()` seeks to the previous item, in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setNewlyRenderedFirstFrame(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://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlayWhenReady(boolean,int)( playWhenReady: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlayWhenReadyChangeReason playWhenReadyChangeReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets whether playback should proceed when ready and not suppressed. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackParameters(androidx.media3.common.PlaybackParameters)(playbackParameters: https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackParameters!)` Sets the currently active `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackParameters`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackState(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State playbackState: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State` of the player. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackSuppressionReason(int)( @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlaybackSuppressionReason playbackSuppressionReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Sets the reason why playback is suppressed even if `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#getPlayWhenReady()` is true. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlayerError(androidx.media3.common.PlaybackException)(playerError: https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException?)` Sets last error that caused playback to fail, or null if there was no error. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(java.util.List<androidx.media3.common.SimpleBasePlayer.MediaItemData>)(playlist: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData!>!)` Sets the playlist as a list of `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(androidx.media3.common.Timeline,androidx.media3.common.Tracks,androidx.media3.common.MediaMetadata)( timeline: https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline!, currentTracks: https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks!, currentMetadata: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata? )` Sets the playlist as a `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` with information about the current `https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks` and `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylistMetadata(androidx.media3.common.MediaMetadata)(playlistMetadata: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata!)` Sets the playlist `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPositionDiscontinuity(int,long)( @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.DiscontinuityReason positionDiscontinuityReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, discontinuityPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Signals that a position discontinuity happened since the last player update and sets the reason for it. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setRepeatMode(int)(@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode repeatMode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode` used for playback. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setSeekBackIncrementMs(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://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setSeekForwardIncrementMs(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://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setShuffleModeEnabled(boolean)(shuffleModeEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Sets whether shuffling of media items is enabled. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setSurfaceSize(androidx.media3.common.util.Size)(surfaceSize: https://developer.android.com/reference/kotlin/androidx/media3/common/util/Size!)` Sets the size of the surface onto which the video is being rendered. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setTimedMetadata(androidx.media3.common.Metadata)(timedMetadata: https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata!)` Sets the most recent timed `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setTotalBufferedDurationMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)( totalBufferedDurationMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier! )` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated total buffered duration in milliseconds. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)( trackSelectionParameters: https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters! )` Sets the currently active `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setUnmuteVolume(float)(unmuteVolume: @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)` Sets the unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setVideoSize(androidx.media3.common.VideoSize)(videoSize: https://developer.android.com/reference/kotlin/androidx/media3/common/VideoSize!)` Sets the current video size. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setVolume(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)` Sets the current audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |

## Public constructors

### Builder

```
Builder()
```

Creates the builder.

## Public functions

### build

```
fun build(): SimpleBasePlayer.State!
```

Builds the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State`.

### clearPositionDiscontinuity

```
@CanIgnoreReturnValue
fun clearPositionDiscontinuity(): SimpleBasePlayer.State.Builder!
```

Clears a previously set position discontinuity signal.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#hasPositionDiscontinuity()` |   |

### setAdBufferedPositionMs

```
@CanIgnoreReturnValue
fun setAdBufferedPositionMs(
    adBufferedPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing ad is buffered, in milliseconds. The value is unused if no ad is playing.

| Parameters |
|---|---|
| `adBufferedPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing ad is buffered, in milliseconds. The value is unused if no ad is playing. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setAdPositionMs

```
@CanIgnoreReturnValue
fun setAdPositionMs(
    adPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current ad playback position in milliseconds. The value is unused if no ad is playing.

The supplier is expected to return the updated position on every call if the playback is advancing, for example by using `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier#getExtrapolating(long,float)`.

This method overrides any other position set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdPositionMs(long)`.

| Parameters |
|---|---|
| `adPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current ad playback position in milliseconds. The value is unused if no ad is playing. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setAdPositionMs

```
@CanIgnoreReturnValue
fun setAdPositionMs(positionMs: Long): SimpleBasePlayer.State.Builder!
```

Sets the current ad playback position in milliseconds. The value is unused if no ad is playing.

This position will be converted to an advancing `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` if the overall state indicates an advancing ad playback position.

This method overrides any other `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)`.

| Parameters |
|---|---|
| `positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The current ad playback position in milliseconds. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setAudioAttributes

```
@CanIgnoreReturnValue
fun setAudioAttributes(audioAttributes: AudioAttributes!): SimpleBasePlayer.State.Builder!
```

Sets the current `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes`.

| Parameters |
|---|---|
| `audioAttributes: https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes!` | The current `https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setAudioSessionId

```
@CanIgnoreReturnValue
fun setAudioSessionId(audioSessionId: Int): SimpleBasePlayer.State.Builder!
```

Sets the current audio session ID.

| Parameters |
|---|---|
| `audioSessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current audio session ID. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setAvailableCommands

```
@CanIgnoreReturnValue
fun setAvailableCommands(availableCommands: Player.Commands!): SimpleBasePlayer.State.Builder!
```

Sets the available `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands`.

| Parameters |
|---|---|
| `availableCommands: https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands!` | The available `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setContentBufferedPositionMs

```
@CanIgnoreReturnValue
fun setContentBufferedPositionMs(
    contentBufferedPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing content is buffered, in milliseconds.

| Parameters |
|---|---|
| `contentBufferedPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated position up to which the currently playing content is buffered, in milliseconds, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` to indicate the default start position. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setContentPositionMs

```
@CanIgnoreReturnValue
fun setContentPositionMs(
    contentPositionMsSupplier: SimpleBasePlayer.PositionSupplier!
): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the current content playback position in milliseconds.

The supplier is expected to return the updated position on every call if the playback is advancing, for example by using `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier#getExtrapolating(long,float)`.

This method overrides any other position set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setContentPositionMs(long)`.

| Parameters |
|---|---|
| `contentPositionMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for 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. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setContentPositionMs

```
@CanIgnoreReturnValue
fun setContentPositionMs(positionMs: Long): SimpleBasePlayer.State.Builder!
```

Sets the current content playback position in milliseconds.

This position will be converted to an advancing `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` if the overall state indicates an advancing playback position.

This method overrides any other `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setContentPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)`.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setCurrentAd

```
@CanIgnoreReturnValue
fun setCurrentAd(adGroupIndex: Int, adIndexInAdGroup: Int): SimpleBasePlayer.State.Builder!
```

Sets the current ad indices, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no ad is playing.

Either both indices need to be `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` or both are not `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()`.

Ads indices can only be set if there is a corresponding `https://developer.android.com/reference/kotlin/androidx/media3/common/AdPlaybackState` defined in the current `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData.Builder#setPeriods(java.util.List<androidx.media3.common.SimpleBasePlayer.PeriodData>)`.

| Parameters |
|---|---|
| `adGroupIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current ad group index, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no ad is playing. |
| `adIndexInAdGroup: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current ad index in the ad group, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` if no ad is playing. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setCurrentCues

```
@CanIgnoreReturnValue
fun setCurrentCues(currentCues: CueGroup!): SimpleBasePlayer.State.Builder!
```

Sets the current `https://developer.android.com/reference/kotlin/androidx/media3/common/text/CueGroup`.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setCurrentMediaItemIndex

```
@CanIgnoreReturnValue
fun setCurrentMediaItemIndex(currentMediaItemIndex: Int): SimpleBasePlayer.State.Builder!
```

Sets the current media item index.

The media item index must be less than the number of `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(java.util.List<androidx.media3.common.SimpleBasePlayer.MediaItemData>)`, if set.

| Parameters |
|---|---|
| `currentMediaItemIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current media item index, or `https://developer.android.com/reference/kotlin/androidx/media3/common/C#INDEX_UNSET()` to assume the default first item in the playlist. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setDeviceInfo

```
@CanIgnoreReturnValue
fun setDeviceInfo(deviceInfo: DeviceInfo!): SimpleBasePlayer.State.Builder!
```

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

| Parameters |
|---|---|
| `deviceInfo: https://developer.android.com/reference/kotlin/androidx/media3/common/DeviceInfo!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/DeviceInfo`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setDeviceVolume

```
@CanIgnoreReturnValue
fun setDeviceVolume(deviceVolume: @IntRange(from = 0) Int): SimpleBasePlayer.State.Builder!
```

Sets the current device volume.

| Parameters |
|---|---|
| `deviceVolume: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The current device volume. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setIsDeviceMuted

```
@CanIgnoreReturnValue
fun setIsDeviceMuted(isDeviceMuted: Boolean): SimpleBasePlayer.State.Builder!
```

Sets whether the device is muted.

| Parameters |
|---|---|
| `isDeviceMuted: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the device is muted. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setIsLoading

```
@CanIgnoreReturnValue
fun setIsLoading(isLoading: Boolean): SimpleBasePlayer.State.Builder!
```

Sets whether the player is currently loading its source.

The player can not be marked as loading if the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackState(int)` is `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 |
|---|---|
| `isLoading: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the player is currently loading its source. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setMaxSeekToPreviousPositionMs

```
@CanIgnoreReturnValue
fun setMaxSeekToPreviousPositionMs(maxSeekToPreviousPositionMs: Long): SimpleBasePlayer.State.Builder!
```

Sets the maximum position for which `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToPrevious()` seeks to the previous item, in milliseconds.

| Parameters |
|---|---|
| `maxSeekToPreviousPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The maximum position for which `https://developer.android.com/reference/kotlin/androidx/media3/common/BasePlayer#seekToPrevious()` seeks to the previous item, in milliseconds. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setNewlyRenderedFirstFrame

```
@CanIgnoreReturnValue
fun setNewlyRenderedFirstFrame(newlyRenderedFirstFrame: Boolean): SimpleBasePlayer.State.Builder!
```

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.

Note: As this will trigger a `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onRenderedFirstFrame()` event, the flag should only be set for the first `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State` update after the first frame was rendered.

| Parameters |
|---|---|
| `newlyRenderedFirstFrame: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the first frame was newly rendered. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlayWhenReady

```
@CanIgnoreReturnValue
fun setPlayWhenReady(
    playWhenReady: Boolean,
    @Player.PlayWhenReadyChangeReason playWhenReadyChangeReason: Int
): SimpleBasePlayer.State.Builder!
```

Sets whether playback should proceed when ready and not suppressed.

| Parameters |
|---|---|
| `playWhenReady: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether playback should proceed when ready and not suppressed. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlayWhenReadyChangeReason playWhenReadyChangeReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlayWhenReadyChangeReason` for changing the value. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaybackParameters

```
@CanIgnoreReturnValue
fun setPlaybackParameters(playbackParameters: PlaybackParameters!): SimpleBasePlayer.State.Builder!
```

Sets the currently active `https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackParameters`.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaybackState

```
@CanIgnoreReturnValue
fun setPlaybackState(@Player.State playbackState: Int): SimpleBasePlayer.State.Builder!
```

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

If the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(java.util.List<androidx.media3.common.SimpleBasePlayer.MediaItemData>)` 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 |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State playbackState: 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. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaybackSuppressionReason

```
@CanIgnoreReturnValue
fun setPlaybackSuppressionReason(
    @Player.PlaybackSuppressionReason playbackSuppressionReason: Int
): SimpleBasePlayer.State.Builder!
```

Sets the reason why playback is suppressed even if `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#getPlayWhenReady()` is true.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlaybackSuppressionReason playbackSuppressionReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlaybackSuppressionReason` why playback is suppressed even if `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer#getPlayWhenReady()` is true. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlayerError

```
@CanIgnoreReturnValue
fun setPlayerError(playerError: PlaybackException?): SimpleBasePlayer.State.Builder!
```

Sets last error that caused playback to fail, or null if there was no error.

The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackState(int)` must be set to `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#STATE_IDLE()` while an error is set.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaylist

```
@CanIgnoreReturnValue
fun setPlaylist(playlist: (Mutable)List<SimpleBasePlayer.MediaItemData!>!): SimpleBasePlayer.State.Builder!
```

Sets the playlist as a list of `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData`.

All items must have unique `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData.Builder#setUid(java.lang.Object)`.

This call replaces any previous playlist set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(androidx.media3.common.Timeline,androidx.media3.common.Tracks,androidx.media3.common.MediaMetadata)`.

| Parameters |
|---|---|
| `playlist: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData!>!` | The list of `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.MediaItemData` in the playlist. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaylist

```
@CanIgnoreReturnValue
fun setPlaylist(
    timeline: Timeline!,
    currentTracks: Tracks!,
    currentMetadata: MediaMetadata?
): SimpleBasePlayer.State.Builder!
```

Sets the playlist as a `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` with information about the current `https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks` and `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata`.

This call replaces any previous playlist set via `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaylist(java.util.List<androidx.media3.common.SimpleBasePlayer.MediaItemData>)`.

| Parameters |
|---|---|
| `timeline: https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` containing the playlist data. |
| `currentTracks: https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks` of the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentMediaItemIndex(int)`. |
| `currentMetadata: https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata?` | The combined `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata` of the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentMediaItemIndex(int)`. If null, the current metadata is assumed to be the combination of the `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem#mediaMetadata()` metadata and the metadata of the selected `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#metadata()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPlaylistMetadata

```
@CanIgnoreReturnValue
fun setPlaylistMetadata(playlistMetadata: MediaMetadata!): SimpleBasePlayer.State.Builder!
```

Sets the playlist `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata`.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setPositionDiscontinuity

```
@CanIgnoreReturnValue
fun setPositionDiscontinuity(
    @Player.DiscontinuityReason positionDiscontinuityReason: Int,
    discontinuityPositionMs: Long
): SimpleBasePlayer.State.Builder!
```

Signals that a position discontinuity happened since the last player update and sets the reason for it.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.DiscontinuityReason positionDiscontinuityReason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.DiscontinuityReason` for the discontinuity. |
| `discontinuityPositionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The position, in milliseconds, in the current content or ad from which playback continues after the discontinuity. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder#clearPositionDiscontinuity()` |   |

### setRepeatMode

```
@CanIgnoreReturnValue
fun setRepeatMode(@Player.RepeatMode repeatMode: Int): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode` used for playback.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setSeekBackIncrementMs

```
@CanIgnoreReturnValue
fun setSeekBackIncrementMs(seekBackIncrementMs: Long): SimpleBasePlayer.State.Builder!
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setSeekForwardIncrementMs

```
@CanIgnoreReturnValue
fun setSeekForwardIncrementMs(seekForwardIncrementMs: Long): SimpleBasePlayer.State.Builder!
```

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setShuffleModeEnabled

```
@CanIgnoreReturnValue
fun setShuffleModeEnabled(shuffleModeEnabled: Boolean): SimpleBasePlayer.State.Builder!
```

Sets whether shuffling of media items is enabled.

| Parameters |
|---|---|
| `shuffleModeEnabled: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether shuffling of media items is enabled. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setSurfaceSize

```
@CanIgnoreReturnValue
fun setSurfaceSize(surfaceSize: Size!): SimpleBasePlayer.State.Builder!
```

Sets the size of the surface onto which the video is being rendered.

| Parameters |
|---|---|
| `surfaceSize: https://developer.android.com/reference/kotlin/androidx/media3/common/util/Size!` | The surface size. Dimensions may be `https://developer.android.com/reference/kotlin/androidx/media3/common/C#LENGTH_UNSET()` if unknown, or 0 if the video is not rendered onto a surface. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setTimedMetadata

```
@CanIgnoreReturnValue
fun setTimedMetadata(timedMetadata: Metadata!): SimpleBasePlayer.State.Builder!
```

Sets the most recent timed `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata`.

Metadata with a `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata#presentationTimeUs()` of `https://developer.android.com/reference/kotlin/androidx/media3/common/C#TIME_UNSET()` will not be forwarded to listeners.

| Parameters |
|---|---|
| `timedMetadata: https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata!` | The most recent timed `https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setTotalBufferedDurationMs

```
@CanIgnoreReturnValue
fun setTotalBufferedDurationMs(
    totalBufferedDurationMsSupplier: SimpleBasePlayer.PositionSupplier!
): SimpleBasePlayer.State.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated total buffered duration in milliseconds.

| Parameters |
|---|---|
| `totalBufferedDurationMsSupplier: https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.PositionSupplier` for the estimated total buffered duration in milliseconds. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setTrackSelectionParameters

```
@CanIgnoreReturnValue
fun setTrackSelectionParameters(
    trackSelectionParameters: TrackSelectionParameters!
): SimpleBasePlayer.State.Builder!
```

Sets the currently active `https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters`.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setUnmuteVolume

```
@CanIgnoreReturnValue
fun setUnmuteVolume(unmuteVolume: @FloatRange(from = 0, to = 1.0) Float): SimpleBasePlayer.State.Builder!
```

Sets the unmute audio volume, with 0 being silence and 1 being unity gain (signal unchanged). This value corresponds to volume that the Player will get after a successful `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#unmute()` call.

| Parameters |
|---|---|
| `unmuteVolume: @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` | The unmuted audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setVideoSize

```
@CanIgnoreReturnValue
fun setVideoSize(videoSize: VideoSize!): SimpleBasePlayer.State.Builder!
```

Sets the current video size.

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

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |

### setVolume

```
@CanIgnoreReturnValue
fun setVolume(volume: @FloatRange(from = 0, to = 1.0) Float): SimpleBasePlayer.State.Builder!
```

Sets the current audio volume, with 0 being silence and 1 being unity gain (signal unchanged).

| Parameters |
|---|---|
| `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` | The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/SimpleBasePlayer.State.Builder!` | This builder. |