# 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)

*** ** * ** ***


```
public final class SimpleBasePlayer.State.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

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

## Public constructors

### Builder

```
public Builder()
```

Creates the builder.

## Public methods

### build

```
public SimpleBasePlayer.State build()
```

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

### clearPositionDiscontinuity

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder clearPositionDiscontinuity()
```

Clears a previously set position discontinuity signal.

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

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

### setAdBufferedPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAdBufferedPositionMs(
    SimpleBasePlayer.PositionSupplier adBufferedPositionMsSupplier
)
```

Sets the `https://developer.android.com/reference/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 |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.PositionSupplier adBufferedPositionMsSupplier` | The `https://developer.android.com/reference/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/androidx/media3/common/SimpleBasePlayer.State.Builder` | This builder. |

### setAdPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAdPositionMs(
    SimpleBasePlayer.PositionSupplier adPositionMsSupplier
)
```

Sets the `https://developer.android.com/reference/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/androidx/media3/common/SimpleBasePlayer.PositionSupplier#getExtrapolating(long,float)`.

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.PositionSupplier adPositionMsSupplier` | The `https://developer.android.com/reference/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/androidx/media3/common/SimpleBasePlayer.State.Builder` | This builder. |

### setAdPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAdPositionMs(long positionMs)
```

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/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/androidx/media3/common/SimpleBasePlayer.PositionSupplier` set via `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State.Builder#setAdPositionMs(androidx.media3.common.SimpleBasePlayer.PositionSupplier)`.

| Parameters |
|---|---|
| `long positionMs` | The current ad playback position in milliseconds. |

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

### setAudioAttributes

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAudioAttributes(AudioAttributes audioAttributes)
```

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

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

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

### setAudioSessionId

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAudioSessionId(int audioSessionId)
```

Sets the current audio session ID.

| Parameters |
|---|---|
| `int audioSessionId` | The current audio session ID. |

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

### setAvailableCommands

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setAvailableCommands(Player.Commands availableCommands)
```

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

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

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

### setContentBufferedPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setContentBufferedPositionMs(
    SimpleBasePlayer.PositionSupplier contentBufferedPositionMsSupplier
)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.PositionSupplier contentBufferedPositionMsSupplier` | The `https://developer.android.com/reference/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/androidx/media3/common/C#TIME_UNSET()` to indicate the default start position. |

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

### setContentPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setContentPositionMs(
    SimpleBasePlayer.PositionSupplier contentPositionMsSupplier
)
```

Sets the `https://developer.android.com/reference/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/androidx/media3/common/SimpleBasePlayer.PositionSupplier#getExtrapolating(long,float)`.

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

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

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

### setContentPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setContentPositionMs(long positionMs)
```

Sets the current content playback position in milliseconds.

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

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

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

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

### setCurrentAd

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setCurrentAd(int adGroupIndex, int adIndexInAdGroup)
```

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

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

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

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

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

### setCurrentCues

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setCurrentCues(CueGroup currentCues)
```

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

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

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

### setCurrentMediaItemIndex

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setCurrentMediaItemIndex(int currentMediaItemIndex)
```

Sets the current media item index.

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

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

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

### setDeviceInfo

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setDeviceInfo(DeviceInfo deviceInfo)
```

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

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

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

### setDeviceVolume

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setDeviceVolume(@IntRange(from = 0) int deviceVolume)
```

Sets the current device volume.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int deviceVolume` | The current device volume. |

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

### setIsDeviceMuted

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setIsDeviceMuted(boolean isDeviceMuted)
```

Sets whether the device is muted.

| Parameters |
|---|---|
| `boolean isDeviceMuted` | Whether the device is muted. |

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

### setIsLoading

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setIsLoading(boolean isLoading)
```

Sets whether the player is currently loading its source.

The player can not be marked as loading if the `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State.Builder#setPlaybackState(int)` is `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_ENDED()`.

| Parameters |
|---|---|
| `boolean isLoading` | Whether the player is currently loading its source. |

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

### setMaxSeekToPreviousPositionMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setMaxSeekToPreviousPositionMs(long maxSeekToPreviousPositionMs)
```

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

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

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

### setNewlyRenderedFirstFrame

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setNewlyRenderedFirstFrame(boolean newlyRenderedFirstFrame)
```

Sets whether a frame has been rendered for the first time since setting the surface, a rendering reset, or since the stream being rendered was changed.

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

| Parameters |
|---|---|
| `boolean newlyRenderedFirstFrame` | Whether the first frame was newly rendered. |

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

### setPlayWhenReady

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlayWhenReady(
    boolean playWhenReady,
    @Player.PlayWhenReadyChangeReason int playWhenReadyChangeReason
)
```

Sets whether playback should proceed when ready and not suppressed.

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

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

### setPlaybackParameters

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaybackParameters(PlaybackParameters playbackParameters)
```

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

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

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

### setPlaybackState

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaybackState(@Player.State int playbackState)
```

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

If the `https://developer.android.com/reference/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/androidx/media3/common/Player#STATE_IDLE()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_ENDED()`.

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

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

### setPlaybackSuppressionReason

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaybackSuppressionReason(
    @Player.PlaybackSuppressionReason int playbackSuppressionReason
)
```

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

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

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

### setPlayerError

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlayerError(@Nullable PlaybackException playerError)
```

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

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

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

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

### setPlaylist

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaylist(List<SimpleBasePlayer.MediaItemData> playlist)
```

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

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

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData> playlist` | The list of `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.MediaItemData` in the playlist. |

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

### setPlaylist

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaylist(
    Timeline timeline,
    Tracks currentTracks,
    @Nullable MediaMetadata currentMetadata
)
```

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

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Timeline timeline` | The `https://developer.android.com/reference/androidx/media3/common/Timeline` containing the playlist data. |
| `https://developer.android.com/reference/androidx/media3/common/Tracks currentTracks` | The `https://developer.android.com/reference/androidx/media3/common/Tracks` of the `https://developer.android.com/reference/androidx/media3/common/SimpleBasePlayer.State.Builder#setCurrentMediaItemIndex(int)`. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/MediaMetadata currentMetadata` | The combined `https://developer.android.com/reference/androidx/media3/common/MediaMetadata` of the `https://developer.android.com/reference/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/androidx/media3/common/MediaItem#mediaMetadata()` metadata and the metadata of the selected `https://developer.android.com/reference/androidx/media3/common/Format#metadata()`. |

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

### setPlaylistMetadata

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPlaylistMetadata(MediaMetadata playlistMetadata)
```

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

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

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

### setPositionDiscontinuity

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setPositionDiscontinuity(
    @Player.DiscontinuityReason int positionDiscontinuityReason,
    long discontinuityPositionMs
)
```

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

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

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

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

### setRepeatMode

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setRepeatMode(@Player.RepeatMode int repeatMode)
```

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

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

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

### setSeekBackIncrementMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setSeekBackIncrementMs(long seekBackIncrementMs)
```

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

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

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

### setSeekForwardIncrementMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setSeekForwardIncrementMs(long seekForwardIncrementMs)
```

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

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

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

### setShuffleModeEnabled

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setShuffleModeEnabled(boolean shuffleModeEnabled)
```

Sets whether shuffling of media items is enabled.

| Parameters |
|---|---|
| `boolean shuffleModeEnabled` | Whether shuffling of media items is enabled. |

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

### setSurfaceSize

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setSurfaceSize(Size surfaceSize)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/Size surfaceSize` | The surface size. Dimensions may be `https://developer.android.com/reference/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/androidx/media3/common/SimpleBasePlayer.State.Builder` | This builder. |

### setTimedMetadata

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setTimedMetadata(Metadata timedMetadata)
```

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

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

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

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

### setTotalBufferedDurationMs

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setTotalBufferedDurationMs(
    SimpleBasePlayer.PositionSupplier totalBufferedDurationMsSupplier
)
```

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

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

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

### setTrackSelectionParameters

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setTrackSelectionParameters(
    TrackSelectionParameters trackSelectionParameters
)
```

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

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

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

### setUnmuteVolume

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setUnmuteVolume(@FloatRange(from = 0, to = 1.0) float unmuteVolume)
```

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/androidx/media3/common/Player#unmute()` call.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0, to = 1.0) float unmuteVolume` | The unmuted audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |

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

### setVideoSize

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setVideoSize(VideoSize videoSize)
```

Sets the current video size.

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

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

### setVolume

```
@CanIgnoreReturnValue
public SimpleBasePlayer.State.Builder setVolume(@FloatRange(from = 0, to = 1.0) float volume)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0, to = 1.0) float volume` | The current audio volume, with 0 being silence and 1 being unity gain (signal unchanged). |

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