# StubExoPlayer

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

*** ** * ** ***


```
@UnstableApi
public class StubExoPlayer extends StubPlayer implements ExoPlayer
```

<br />

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

*** ** * ** ***

An abstract `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer` implementation that throws `https://developer.android.com/reference/java/lang/UnsupportedOperationException.html` from every method.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#StubExoPlayer()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addAnalyticsListener(androidx.media3.exoplayer.analytics.AnalyticsListener)(https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener listener)` Adds an `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener` to receive analytics events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addAudioCodecParametersChangeListener(androidx.media3.exoplayer.CodecParametersChangeListener,java.util.List<java.lang.String>)( https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> keys )` Adds a listener for audio codec parameter changes. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addAudioOffloadListener(androidx.media3.exoplayer.ExoPlayer.AudioOffloadListener)(https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.AudioOffloadListener listener)` Adds a listener to receive audio offload events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addMediaSource(androidx.media3.exoplayer.source.MediaSource)(https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource)` Adds a media source to the end of the playlist. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addMediaSource(int,androidx.media3.exoplayer.source.MediaSource)(int index, https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource)` Adds a media source at the given index of the playlist. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addMediaSources(java.util.List<androidx.media3.exoplayer.source.MediaSource>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources)` Adds a list of media sources to the end of the playlist. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addMediaSources(int,java.util.List<androidx.media3.exoplayer.source.MediaSource>)(int index, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources)` Adds a list of media sources at the given index of the playlist. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addVideoCodecParametersChangeListener(androidx.media3.exoplayer.CodecParametersChangeListener,java.util.List<java.lang.String>)( https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener, https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> keys )` Adds a listener for video codec parameter changes. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#addVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)(https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener)` Adds a listener to receive video frame metadata events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#clearAuxEffectInfo()()` Detaches any previously attached auxiliary audio effect from the underlying audio track. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#clearCameraMotionListener(androidx.media3.exoplayer.video.spherical.CameraMotionListener)(https://developer.android.com/reference/androidx/media3/exoplayer/video/spherical/CameraMotionListener listener)` Clears the listener which receives camera motion events if it matches the one passed. |
| `void` | `[clearVideoFrameMetadataListener](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#clearVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener))(https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` instead. <br /> |
| `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#createMessage(androidx.media3.exoplayer.PlayerMessage.Target)(https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage.Target target)` Creates a message that can be sent to a `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage.Target`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsCollector` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getAnalyticsCollector()()` Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsCollector` used for collecting analytics events. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getAudioDecoderCounters()()` Returns `https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` for audio, or null if no audio is being played. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getAudioFormat()()` Returns the audio format currently being played, or null if no audio is being played. |
| `int` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getAudioSessionId()()` Returns the audio session identifier, or `https://developer.android.com/reference/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if not set. |
| `https://developer.android.com/reference/androidx/media3/common/util/Clock` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getClock()()` Returns the `https://developer.android.com/reference/androidx/media3/common/util/Clock` used for playback. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/TrackGroupArray` | `[getCurrentTrackGroups](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getCurrentTrackGroups())()` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTracks()`. <br /> |
| `https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelectionArray` | `[getCurrentTrackSelections](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getCurrentTrackSelections())()` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTracks()`. <br /> |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getPauseAtEndOfMediaItems()()` Returns whether the player pauses playback at the end of each media item. |
| `https://developer.android.com/reference/android/os/Looper.html` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getPlaybackLooper()()` Returns the `https://developer.android.com/reference/android/os/Looper.html` associated with the playback thread. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlaybackException` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getPlayerError()()` Returns the error that caused playback to fail. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getPreloadConfiguration()()` Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getRenderer(int)(int index)` Returns the renderer at the given index. |
| `int` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getRendererCount()()` Returns the number of renderers. |
| `int` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getRendererType(int)(int index)` Returns the track type that the renderer at a given index handles. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getScrubbingModeParameters()()` Gets the parameters that control behavior in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getSecondaryRenderer(int)(int index)` Returns the secondary renderer at the given index. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/SeekParameters` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getSeekParameters()()` Returns the currently active `https://developer.android.com/reference/androidx/media3/exoplayer/SeekParameters` of the player. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/ShuffleOrder` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getShuffleOrder()()` Returns the shuffle order. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getSkipSilenceEnabled()()` Returns whether skipping silences in the audio stream is enabled. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/trackselection/TrackSelector` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getTrackSelector()()` Returns the track selector that this player uses, or null if track selection is not supported. |
| `int` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getVideoChangeFrameRateStrategy()()` Returns the `https://developer.android.com/reference/androidx/media3/common/C.VideoChangeFrameRateStrategy`. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getVideoDecoderCounters()()` Returns `https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` for video, or null if no video is being played. |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getVideoFormat()()` Returns the video format currently being played, or null if no video is being played. |
| `int` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getVideoScalingMode()()` Returns the `https://developer.android.com/reference/androidx/media3/common/C.VideoScalingMode`. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#isReleased()()` Returns whether `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#release()` has been called on the player. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#isScrubbingModeEnabled()()` Returns whether the player is optimized for scrubbing (many frequent seeks). |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#isSleepingForOffload()()` Returns whether the player has paused its main loop to save power in offload scheduling mode. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#isTunnelingEnabled()()` Returns whether [tunneling](https://source.android.com/devices/tv/multimedia-tunneling) is enabled for the currently selected tracks. |
| `void` | `[prepare](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource))(https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource)` and `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#prepare()` instead. <br /> |
| `void` | `[prepare](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource,boolean,boolean))( https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource, boolean resetPosition, boolean resetState )` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource,boolean)` and `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#prepare()` instead. <br /> |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#removeAnalyticsListener(androidx.media3.exoplayer.analytics.AnalyticsListener)(https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener listener)` Removes an `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#removeAudioCodecParametersChangeListener(androidx.media3.exoplayer.CodecParametersChangeListener)( https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener )` Removes a listener for audio codec parameter changes. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#removeAudioOffloadListener(androidx.media3.exoplayer.ExoPlayer.AudioOffloadListener)(https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.AudioOffloadListener listener)` Removes a listener of audio offload events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#removeVideoCodecParametersChangeListener(androidx.media3.exoplayer.CodecParametersChangeListener)( https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener )` Removes a listener for video codec parameter changes. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)(https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener)` Removes a listener to receive video frame metadata events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setAudioAttributes(androidx.media3.common.AudioAttributes,boolean)( https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes, boolean handleAudioFocus )` Sets the attributes for audio playback, used by the underlying audio track. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setAudioCodecParameters(androidx.media3.exoplayer.CodecParameters)(https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters codecParameters)` Sets a collection of parameters on the underlying audio codecs. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setAudioSessionId(int)(int audioSessionId)` Sets the ID of the audio session to attach to the underlying `https://developer.android.com/reference/android/media/AudioTrack.html`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setAuxEffectInfo(androidx.media3.common.AuxEffectInfo)(https://developer.android.com/reference/androidx/media3/common/AuxEffectInfo auxEffectInfo)` Sets information on an auxiliary audio effect to attach to the underlying audio track. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setCameraMotionListener(androidx.media3.exoplayer.video.spherical.CameraMotionListener)(https://developer.android.com/reference/androidx/media3/exoplayer/video/spherical/CameraMotionListener listener)` Sets a listener of camera motion events. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setEnforceAdPlaybackOnTimelineRefresh(boolean)( boolean enforceAdPlaybackOnTimelineRefresh )` Sets whether to enforce ad playback on timeline refresh. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setForegroundMode(boolean)(boolean foregroundMode)` Sets whether the player is allowed to keep holding limited resources such as video decoders, even when in the idle state. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setHandleAudioBecomingNoisy(boolean)(boolean handleAudioBecomingNoisy)` Sets whether the player should pause automatically when audio is rerouted from a headset to device speakers. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setImageOutput(androidx.media3.exoplayer.image.ImageOutput)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput imageOutput)` Sets the `https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput` where rendered images will be forwarded. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMaxSeekToPreviousPositionMs(long)(long maxSeekToPreviousPositionMs)` Sets the maximum position for which `https://developer.android.com/reference/androidx/media3/common/Player#seekToPrevious()` seeks to the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource)(https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource)` Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` and resets the position to the default position. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource,boolean)(https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource, boolean resetPosition)` Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource,long)(https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource, long startPositionMs)` Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSources(java.util.List<androidx.media3.exoplayer.source.MediaSource>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources)` Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` and resets the position to the default position. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSources(java.util.List<androidx.media3.exoplayer.source.MediaSource>,boolean)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources, boolean resetPosition)` Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSources(java.util.List<androidx.media3.exoplayer.source.MediaSource>,int,long)( https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources, int startMediaItemIndex, long startPositionMs )` Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setPauseAtEndOfMediaItems(boolean)(boolean pauseAtEndOfMediaItems)` Sets whether to pause playback at the end of each media item. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setPreferredAudioDevice(android.media.AudioDeviceInfo)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/AudioDeviceInfo.html audioDeviceInfo)` Sets the preferred audio device. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setPreloadConfiguration(androidx.media3.exoplayer.ExoPlayer.PreloadConfiguration)( https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration preloadConfiguration )` Sets the `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration` to configure playlist preloading. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setPriority(int)(@https://developer.android.com/reference/androidx/media3/common/C.Priority int priority)` Sets the `https://developer.android.com/reference/androidx/media3/common/C.Priority` for this player. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setPriorityTaskManager(androidx.media3.common.PriorityTaskManager)( @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager priorityTaskManager )` Sets a `https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager`, or null to clear a previously set priority task manager. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setScrubbingModeEnabled(boolean)(boolean scrubbingModeEnabled)` Sets whether to optimize the player for scrubbing (many frequent seeks). |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setScrubbingModeParameters(androidx.media3.exoplayer.ScrubbingModeParameters)( https://developer.android.com/reference/androidx/media3/exoplayer/ScrubbingModeParameters scrubbingModeParameters )` Sets the parameters that control behavior in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setSeekBackIncrementMs(long)(long seekBackIncrementMs)` Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekBack()` increment. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setSeekForwardIncrementMs(long)(long seekForwardIncrementMs)` Sets the `https://developer.android.com/reference/androidx/media3/common/Player#seekForward()` increment. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setSeekParameters(androidx.media3.exoplayer.SeekParameters)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/SeekParameters seekParameters)` Sets the parameters that control how seek operations are performed. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setShuffleOrder(androidx.media3.exoplayer.source.ShuffleOrder)(https://developer.android.com/reference/androidx/media3/exoplayer/source/ShuffleOrder shuffleOrder)` Sets the shuffle order. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setSkipSilenceEnabled(boolean)(boolean skipSilenceEnabled)` Sets whether skipping silences in the audio stream is enabled. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoChangeFrameRateStrategy(int)(int videoChangeFrameRateStrategy)` Sets a `https://developer.android.com/reference/androidx/media3/common/C.VideoChangeFrameRateStrategy` that will be used by the player when provided with a video output `https://developer.android.com/reference/android/view/Surface.html`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoCodecParameters(androidx.media3.exoplayer.CodecParameters)(https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters codecParameters)` Sets a collection of parameters on the underlying video codecs. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoEffects(java.util.List<androidx.media3.common.Effect>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/Effect> videoEffects)` Sets a `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/media3/common/Effect` that will be applied to each video frame. |
| `void` | `[setVideoFrameMetadataListener](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener))(https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#addVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` and `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` instead. <br /> |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoScalingMode(int)(int videoScalingMode)` Sets the `https://developer.android.com/reference/androidx/media3/common/C.VideoScalingMode`. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVirtualDeviceId(int)(int virtualDeviceId)` Sets the virtual device id to be used for playback. |
| `void` | `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setWakeMode(int)(int wakeMode)` Sets how the player should keep the device awake for playback when the screen is off. |

### Inherited Constants

From [androidx.media3.exoplayer.ExoPlayer](https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer) `static final long` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#DEFAULT_DETACH_SURFACE_TIMEOUT_MS() = 2000`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#DEFAULT_DETACH_SURFACE_TIMEOUT_MS()` instead.

<br />

`static final long` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#DEFAULT_RELEASE_TIMEOUT_MS() = 500`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#DEFAULT_RELEASE_TIMEOUT_MS()` instead.

<br />

`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#DEFAULT_STUCK_BUFFERING_DETECTION_TIMEOUT_MS() = 600000`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#DEFAULT_STUCK_BUFFERING_DETECTION_TIMEOUT_MS()` instead.

<br />

`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#DEFAULT_STUCK_PLAYING_NOT_ENDING_TIMEOUT_MS() = 60000`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#DEFAULT_STUCK_PLAYING_NOT_ENDING_TIMEOUT_MS()` instead.

<br />

`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#DEFAULT_STUCK_SUPPRESSED_DETECTION_TIMEOUT_MS() = 600000`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#DEFAULT_STUCK_SUPPRESSED_DETECTION_TIMEOUT_MS()` instead.

<br />

From [androidx.media3.common.Player](https://developer.android.com/reference/androidx/media3/common/Player) `static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_ADJUST_DEVICE_VOLUME() = 26`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS() = 34`

Command to increase and decrease the device volume and mute it with volume flags.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_CHANGE_MEDIA_ITEMS() = 20`

Command to change the `https://developer.android.com/reference/androidx/media3/common/MediaItem` in the playlist.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_AUDIO_ATTRIBUTES() = 21`

Command to get the player current `https://developer.android.com/reference/androidx/media3/common/AudioAttributes`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_CURRENT_MEDIA_ITEM() = 16`

Command to get information about the currently playing `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_DEVICE_VOLUME() = 23`

Command to get the device volume and whether it is muted.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_MEDIA_ITEMS_METADATA() = 18`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_METADATA()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_METADATA() = 18`

Command to get metadata related to the playlist and current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_TEXT() = 28`

Command to get the text that should currently be displayed by the player.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_TIMELINE() = 17`

Command to get the information about the current timeline.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_TRACKS() = 30`

Command to get details of the current track selection.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_GET_VOLUME() = 22`

Command to get the player volume.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_INVALID() = -1`

Represents an invalid `https://developer.android.com/reference/androidx/media3/common/Player.Command`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_PLAY_PAUSE() = 1`

Command to start, pause or resume playback.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_PREPARE() = 2`

Command to prepare the player.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_RELEASE() = 32`

Command to release the player.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_BACK() = 11`

Command to seek back by a fixed increment inside the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_FORWARD() = 12`

Command to seek forward by a fixed increment inside the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM() = 5`

Command to seek anywhere inside the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_IN_CURRENT_WINDOW() = 5`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_DEFAULT_POSITION() = 4`

Command to seek to the default position of the current `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_MEDIA_ITEM() = 10`

Command to seek anywhere in any `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT() = 9`

Command to seek to a later position in the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` or the default position of the next `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM() = 8`

Command to seek to the default position of the next `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT_WINDOW() = 8`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS() = 7`

Command to seek to an earlier position in the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` or the default position of the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM() = 6`

Command to seek to the default position of the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS_WINDOW() = 6`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM()` instead.

<br />

`static final int` `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi
https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_WINDOW() = 10`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SEEK_TO_MEDIA_ITEM()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_AUDIO_ATTRIBUTES() = 35`

Command to set the player's audio attributes.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_DEVICE_VOLUME() = 25`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS() = 33`

Command to set the device volume with volume flags.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEM() = 31`

Command to set a `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEMS_METADATA() = 19`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_PLAYLIST_METADATA()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_PLAYLIST_METADATA() = 19`

Command to set the playlist metadata.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_REPEAT_MODE() = 15`

Command to set the repeat mode.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_SHUFFLE_MODE() = 14`

Command to enable shuffling.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_SPEED_AND_PITCH() = 13`

Command to set the playback speed and pitch.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_TRACK_SELECTION_PARAMETERS() = 29`

Command to set the player's track selection parameters.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_VIDEO_SURFACE() = 27`

Command to set and clear the surface on which to render the video.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_VOLUME() = 24`

Command to set the player volume.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_STOP() = 3`

Command to stop playback.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_AUTO_TRANSITION() = 0`

Automatic playback transition from one period in the timeline to the next.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_INTERNAL() = 5`

Discontinuity introduced internally (e.g. by the source).
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_REMOVE() = 4`

Discontinuity caused by the removal of the current period from the `https://developer.android.com/reference/androidx/media3/common/Timeline`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_SEEK() = 1`

Seek within the current period or to another period.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_SEEK_ADJUSTMENT() = 2`

Seek adjustment due to being unable to seek to the requested position or because the seek was permitted to be inexact.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_SILENCE_SKIP() = 6`

Discontinuity introduced by a skipped silence.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#DISCONTINUITY_REASON_SKIP() = 3`

Discontinuity introduced by a skipped period (for instance a skipped ad).
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_AUDIO_ATTRIBUTES_CHANGED() = 20`

`https://developer.android.com/reference/androidx/media3/common/Player#getAudioAttributes()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_AUDIO_SESSION_ID() = 21`

The audio session id was set.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_AVAILABLE_COMMANDS_CHANGED() = 13`

`https://developer.android.com/reference/androidx/media3/common/Player#isCommandAvailable(int)` changed for at least one `https://developer.android.com/reference/androidx/media3/common/Player.Command`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_CUES() = 27`

`https://developer.android.com/reference/androidx/media3/common/Player#getCurrentCues()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_DEVICE_INFO_CHANGED() = 29`

`https://developer.android.com/reference/androidx/media3/common/Player#getDeviceInfo()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_DEVICE_VOLUME_CHANGED() = 30`

`https://developer.android.com/reference/androidx/media3/common/Player#getDeviceVolume()` or `https://developer.android.com/reference/androidx/media3/common/Player#isDeviceMuted()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_IS_LOADING_CHANGED() = 3`

`https://developer.android.com/reference/androidx/media3/common/Player#isLoading()` ()} changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_IS_PLAYING_CHANGED() = 7`

`https://developer.android.com/reference/androidx/media3/common/Player#isPlaying()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_MAX_SEEK_TO_PREVIOUS_POSITION_CHANGED() = 18`

`https://developer.android.com/reference/androidx/media3/common/Player#getMaxSeekToPreviousPosition()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_MEDIA_ITEM_TRANSITION() = 1`

`https://developer.android.com/reference/androidx/media3/common/Player#getCurrentMediaItem()` changed or the player started repeating the current item.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_MEDIA_METADATA_CHANGED() = 14`

`https://developer.android.com/reference/androidx/media3/common/Player#getMediaMetadata()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_METADATA() = 28`

Metadata associated with the current playback time changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAYBACK_PARAMETERS_CHANGED() = 12`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackParameters()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAYBACK_STATE_CHANGED() = 4`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackState()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAYBACK_SUPPRESSION_REASON_CHANGED() = 6`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackSuppressionReason()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAYER_ERROR() = 10`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlayerError()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAYLIST_METADATA_CHANGED() = 15`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlaylistMetadata()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_PLAY_WHEN_READY_CHANGED() = 5`

`https://developer.android.com/reference/androidx/media3/common/Player#getPlayWhenReady()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_POSITION_DISCONTINUITY() = 11`

A position discontinuity occurred.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_RENDERED_FIRST_FRAME() = 26`

A frame is rendered for the first time since setting the surface, or since the renderer was reset, or since the stream being rendered was changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_REPEAT_MODE_CHANGED() = 8`

`https://developer.android.com/reference/androidx/media3/common/Player#getRepeatMode()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_SEEK_BACK_INCREMENT_CHANGED() = 16`

`https://developer.android.com/reference/androidx/media3/common/Player#getSeekBackIncrement()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_SEEK_FORWARD_INCREMENT_CHANGED() = 17`

`https://developer.android.com/reference/androidx/media3/common/Player#getSeekForwardIncrement()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_SHUFFLE_MODE_ENABLED_CHANGED() = 9`

`https://developer.android.com/reference/androidx/media3/common/Player#getShuffleModeEnabled()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_SKIP_SILENCE_ENABLED_CHANGED() = 23`

Skipping silences in the audio stream is enabled or disabled.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_SURFACE_SIZE_CHANGED() = 24`

The size of the surface onto which the video is being rendered changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_TIMELINE_CHANGED() = 0`

`https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTimeline()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_TRACKS_CHANGED() = 2`

`https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTracks()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_TRACK_SELECTION_PARAMETERS_CHANGED() = 19`

`https://developer.android.com/reference/androidx/media3/common/Player#getTrackSelectionParameters()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_VIDEO_SIZE_CHANGED() = 25`

`https://developer.android.com/reference/androidx/media3/common/Player#getVideoSize()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#EVENT_VOLUME_CHANGED() = 22`

`https://developer.android.com/reference/androidx/media3/common/Player#getVolume()` changed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#MEDIA_ITEM_TRANSITION_REASON_AUTO() = 1`

Playback has automatically transitioned to the next media item.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#MEDIA_ITEM_TRANSITION_REASON_PLAYLIST_CHANGED() = 3`

The current media item has changed because of a change in the playlist.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#MEDIA_ITEM_TRANSITION_REASON_REPEAT() = 0`

The media item has been repeated.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#MEDIA_ITEM_TRANSITION_REASON_SEEK() = 2`

A seek to another media item has occurred.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_NONE() = 0`

Playback is not suppressed.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_SCRUBBING() = 4`

Playback is suppressed because the player is currently scrubbing.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_TRANSIENT_AUDIO_FOCUS_LOSS() = 1`

Playback is suppressed due to transient audio focus loss.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT() = 3`

Playback is suppressed due to attempt to play on an unsuitable audio output (e.g. attempt to play on built-in speaker on a Wear OS device).
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_ROUTE() = 2`

**This field is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT()` instead.

<br />

`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_BECOMING_NOISY() = 3`

Playback has been paused to avoid becoming noisy.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_AUDIO_FOCUS_LOSS() = 2`

Playback has been paused because of a loss of audio focus.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM() = 5`

Playback has been paused at the end of a media item.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_REMOTE() = 4`

Playback has been started or paused because of a remote change.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_SUPPRESSED_TOO_LONG() = 6`

Playback has been paused because playback has been `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackSuppressionReason()` too long.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_USER_REQUEST() = 1`

Playback has been started or paused by a call to `https://developer.android.com/reference/androidx/media3/common/Player#setPlayWhenReady(boolean)`.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#REPEAT_MODE_ALL() = 2`

Repeats the entire timeline infinitely.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#REPEAT_MODE_OFF() = 0`

Normal playback without repetition.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#REPEAT_MODE_ONE() = 1`

Repeats the currently playing `https://developer.android.com/reference/androidx/media3/common/MediaItem` infinitely during ongoing playback.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#STATE_BUFFERING() = 2`

The player is not able to immediately play the media, but is doing work toward being able to do so.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#STATE_ENDED() = 4`

The player has finished playing the media.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE() = 1`

The player is idle, meaning it holds only limited resources.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY() = 3`

The player is able to immediately play from its current position.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED() = 0`

Timeline changed as a result of a change of the playlist items or the order of the items.
`static final int` `https://developer.android.com/reference/androidx/media3/common/Player#TIMELINE_CHANGE_REASON_SOURCE_UPDATE() = 1`

Timeline changed as a result of a source update (e.g. result of a dynamic update by the played media).

### Inherited fields

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

### Inherited methods

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

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

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

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

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

Clears the playlist.
`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getBufferedPercentage()()`

Returns an estimate of the percentage in the current content or ad up to which data is buffered, or 0 if no estimate is available.
`final long` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getContentDuration()()`

If `https://developer.android.com/reference/androidx/media3/common/Player#isPlayingAd()` returns `true`, returns the duration of the current content in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the duration is not known.
`final long` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentLiveOffset()()`

Returns the offset of the current playback position from the live edge in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the current `https://developer.android.com/reference/androidx/media3/common/MediaItem``https://developer.android.com/reference/androidx/media3/common/Player#isCurrentMediaItemLive()` or the offset is unknown.
`final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentManifest()()`

Returns the current manifest.
`final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/MediaItem` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentMediaItem()()`

Returns the currently playing `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`final int` `[getCurrentWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getCurrentWindowIndex())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentMediaItemIndex()` instead.

<br />

`final https://developer.android.com/reference/androidx/media3/common/MediaItem` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getMediaItemAt(int)(int index)`

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

Returns the number of `https://developer.android.com/reference/androidx/media3/common/MediaItem` in the playlist.
`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getNextMediaItemIndex()()`

Returns the index of the `https://developer.android.com/reference/androidx/media3/common/MediaItem` that will be played if `https://developer.android.com/reference/androidx/media3/common/Player#seekToNextMediaItem()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final int` `[getNextWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getNextWindowIndex())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getNextMediaItemIndex()` instead.

<br />

`final int` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getPreviousMediaItemIndex()()`

Returns the index of the `https://developer.android.com/reference/androidx/media3/common/MediaItem` that will be played if `https://developer.android.com/reference/androidx/media3/common/Player#seekToPreviousMediaItem()` is called, which may depend on the current repeat mode and whether shuffle mode is enabled.
`final int` `[getPreviousWindowIndex](https://developer.android.com/reference/androidx/media3/common/BasePlayer#getPreviousWindowIndex())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/BasePlayer#getPreviousMediaItemIndex()` instead.

<br />

`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#hasNextMediaItem()()`

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

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

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

Returns whether the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` is dynamic (may change when the `https://developer.android.com/reference/androidx/media3/common/Timeline` is updated), or `false` if the `https://developer.android.com/reference/androidx/media3/common/Timeline` is empty.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemLive()()`

Returns whether the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` is live, or `false` if the `https://developer.android.com/reference/androidx/media3/common/Timeline` is empty.
`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemSeekable()()`

Returns whether the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` is seekable, or `false` if the `https://developer.android.com/reference/androidx/media3/common/Timeline` is empty.
`final boolean` `[isCurrentWindowDynamic](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowDynamic())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemDynamic()` instead.

<br />

`final boolean` `[isCurrentWindowLive](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowLive())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemLive()` instead.

<br />

`final boolean` `[isCurrentWindowSeekable](https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentWindowSeekable())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isCurrentMediaItemSeekable()` instead.

<br />

`final boolean` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#isPlaying()()`

Returns whether the player is playing, i.e. `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentPosition()` is advancing.
`final void` `https://developer.android.com/reference/androidx/media3/common/BasePlayer#moveMediaItem(int,int)(int currentIndex, int newIndex)`

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Changes the rate at which playback occurs.
From [androidx.media3.exoplayer.ExoPlayer](https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer) `abstract void` `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#replaceMediaItem(int,androidx.media3.common.MediaItem)(int index, https://developer.android.com/reference/androidx/media3/common/MediaItem mediaItem)`

Replaces the media item at the given index of the playlist.
From [androidx.media3.common.Player](https://developer.android.com/reference/androidx/media3/common/Player) `abstract void` `[setDeviceVolume](https://developer.android.com/reference/androidx/media3/common/Player#setDeviceVolume(int))(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int volume)`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceVolume(int,int)` instead.

<br />

`abstract void` `https://developer.android.com/reference/androidx/media3/common/Player#setDeviceVolume(int,int)(@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int volume, @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

Sets the volume of the device with volume flags.
`abstract void` `https://developer.android.com/reference/androidx/media3/common/Player#setPlaybackSpeed(float)(@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0, fromInclusive = false) float speed)`

Changes the rate at which playback occurs.
`abstract void` `https://developer.android.com/reference/androidx/media3/common/Player#setVolume(float)(@https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0, to = 1.0) float volume)`

Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal unchanged), inclusive.
From [androidx.media3.test.utils.StubPlayer](https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer) `void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#addListener(androidx.media3.common.Player.Listener)(https://developer.android.com/reference/androidx/media3/common/Player.Listener listener)`

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

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

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

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

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

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

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

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#decreaseDeviceVolume(int)` instead.

<br />

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

Decreases the volume of the device.
`https://developer.android.com/reference/android/os/Looper.html` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getApplicationLooper()()`

Returns the `https://developer.android.com/reference/android/os/Looper.html` associated with the application thread that's used to access the player and on which player events are received.
`https://developer.android.com/reference/androidx/media3/common/AudioAttributes` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getAudioAttributes()()`

Returns the attributes for audio playback.
`https://developer.android.com/reference/androidx/media3/common/Player.Commands` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getAvailableCommands()()`

Returns the player's currently available `https://developer.android.com/reference/androidx/media3/common/Player.Commands`.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getBufferedPosition()()`

Returns an estimate of the position in the current content or ad up to which data is buffered, in milliseconds.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getContentBufferedPosition()()`

If `https://developer.android.com/reference/androidx/media3/common/Player#isPlayingAd()` returns `true`, returns an estimate of the content position in the current content up to which data is buffered, in milliseconds.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getContentPosition()()`

If `https://developer.android.com/reference/androidx/media3/common/Player#isPlayingAd()` returns `true`, returns the content position that will be played once all ads in the ad group have finished playing, in milliseconds.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentAdGroupIndex()()`

If `https://developer.android.com/reference/androidx/media3/common/Player#isPlayingAd()` returns true, returns the index of the ad group in the period currently being played.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentAdIndexInAdGroup()()`

If `https://developer.android.com/reference/androidx/media3/common/Player#isPlayingAd()` returns true, returns the index of the ad in its ad group.
`https://developer.android.com/reference/androidx/media3/common/text/CueGroup` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentCues()()`

Returns the current `https://developer.android.com/reference/androidx/media3/common/text/CueGroup`.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentMediaItemIndex()()`

Returns the index of the current `https://developer.android.com/reference/androidx/media3/common/MediaItem` in the `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTimeline()`, or the prospective index if the `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTimeline()` is empty.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentPeriodIndex()()`

Returns the index of the period currently being played.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentPosition()()`

Returns the playback position in the current content or ad, in milliseconds, or the prospective position in milliseconds if the `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTimeline()` is empty.
`https://developer.android.com/reference/androidx/media3/common/Timeline` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTimeline()()`

Returns the current `https://developer.android.com/reference/androidx/media3/common/Timeline`.
`https://developer.android.com/reference/androidx/media3/common/Tracks` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTracks()()`

Returns the current tracks.
`https://developer.android.com/reference/androidx/media3/common/DeviceInfo` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getDeviceInfo()()`

Gets the device information.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getDeviceVolume()()`

Gets the current volume of the device.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getDuration()()`

Returns the duration of the current content or ad in milliseconds, or `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` if the duration is not known.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getMaxSeekToPreviousPosition()()`

Returns the maximum position for which `https://developer.android.com/reference/androidx/media3/common/Player#seekToPrevious()` seeks to the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`, in milliseconds.
`https://developer.android.com/reference/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getMediaMetadata()()`

Returns the current combined `https://developer.android.com/reference/androidx/media3/common/MediaMetadata`, or `https://developer.android.com/reference/androidx/media3/common/MediaMetadata#EMPTY()` if not supported.
`boolean` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getPlayWhenReady()()`

Whether playback will proceed when `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackState()` == `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()`.
`https://developer.android.com/reference/androidx/media3/common/PlaybackParameters` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getPlaybackParameters()()`

Returns the currently active playback parameters.
`int` `@https://developer.android.com/reference/androidx/media3/common/Player.State
https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getPlaybackState()()`

Returns the current `https://developer.android.com/reference/androidx/media3/common/Player.State` of the player.
`int` `@https://developer.android.com/reference/androidx/media3/common/Player.PlaybackSuppressionReason
https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getPlaybackSuppressionReason()()`

Returns the reason why playback is suppressed even though `https://developer.android.com/reference/androidx/media3/common/Player#getPlayWhenReady()` is `
true`, or `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_NONE()` if playback is not suppressed.
`https://developer.android.com/reference/androidx/media3/common/MediaMetadata` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getPlaylistMetadata()()`

Returns the playlist `https://developer.android.com/reference/androidx/media3/common/MediaMetadata`, as set by `https://developer.android.com/reference/androidx/media3/common/Player#setPlaylistMetadata(androidx.media3.common.MediaMetadata)`, or `https://developer.android.com/reference/androidx/media3/common/MediaMetadata#EMPTY()` if not supported.
`int` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getRepeatMode()()`

Returns the current `https://developer.android.com/reference/androidx/media3/common/Player.RepeatMode` used for playback.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getSeekBackIncrement()()`

Returns the `https://developer.android.com/reference/androidx/media3/common/Player#seekBack()` increment.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getSeekForwardIncrement()()`

Returns the `https://developer.android.com/reference/androidx/media3/common/Player#seekForward()` increment.
`boolean` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getShuffleModeEnabled()()`

Returns whether shuffling of media items is enabled.
`https://developer.android.com/reference/androidx/media3/common/util/Size` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getSurfaceSize()()`

Gets the size of the surface on which the video is rendered.
`long` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getTotalBufferedDuration()()`

Returns an estimate of the total buffered duration from the current position, in milliseconds.
`https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getTrackSelectionParameters()()`

Returns the parameters constraining the track selection.
`https://developer.android.com/reference/androidx/media3/common/VideoSize` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getVideoSize()()`

Gets the size of the video.
`float` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getVolume()()`

Returns the audio volume, with 0 being silence and 1 being unity gain (signal unchanged).
`void` `[increaseDeviceVolume](https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#increaseDeviceVolume())()`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#increaseDeviceVolume(int)` instead.

<br />

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

Increases the volume of the device.
`boolean` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#isDeviceMuted()()`

Gets whether the device is muted or not.
`boolean` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#isLoading()()`

Whether the player is currently loading the source.
`boolean` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#isPlayingAd()()`

Returns whether the player is currently playing an ad.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#moveMediaItems(int,int,int)(int fromIndex, int toIndex, int newIndex)`

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

Sets the audio volume to 0.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#prepare()()`

Prepares the player.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#release()()`

Releases the player.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#removeListener(androidx.media3.common.Player.Listener)(https://developer.android.com/reference/androidx/media3/common/Player.Listener listener)`

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

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

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

Seeks to a position in the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`void` `[setDeviceMuted](https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setDeviceMuted(boolean))(boolean muted)`

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setDeviceMuted(boolean,int)` instead.

<br />

`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setDeviceMuted(boolean,int)(boolean muted, @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

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

**This method is deprecated.**

Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setDeviceVolume(int,int)` instead.

<br />

`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setDeviceVolume(int,int)(int volume, @https://developer.android.com/reference/androidx/media3/common/C.VolumeFlags int flags)`

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

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

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/common/MediaItem`.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setPlayWhenReady(boolean)(boolean playWhenReady)`

Sets whether playback should proceed when `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackState()` == `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()`.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setPlaybackParameters(androidx.media3.common.PlaybackParameters)(https://developer.android.com/reference/androidx/media3/common/PlaybackParameters playbackParameters)`

Attempts to set the playback parameters.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setPlaylistMetadata(androidx.media3.common.MediaMetadata)(https://developer.android.com/reference/androidx/media3/common/MediaMetadata mediaMetadata)`

Sets the playlist `https://developer.android.com/reference/androidx/media3/common/MediaMetadata`.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#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` to be used for playback.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setShuffleModeEnabled(boolean)(boolean shuffleModeEnabled)`

Sets whether shuffling of media items is enabled.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)(https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters parameters)`

Sets the parameters constraining the track selection.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#setVideoSurface(android.view.Surface)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/view/Surface.html surface)`

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

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

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

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

Sets the audio volume, valid values are between 0 (silence) and 1 (unity gain, signal unchanged), inclusive.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#stop()()`

Stops playback without resetting the playlist.
`void` `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#unmute()()`

If the audio volume is 0, sets the audio volume to a non-zero value decided by the Player to be the most appropriate.

## Public constructors

### StubExoPlayer

```
public StubExoPlayer()
```

## Public methods

### addAnalyticsListener

```
public void addAnalyticsListener(AnalyticsListener listener)
```

Adds an `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener` to receive analytics events.

This method can be called from any thread.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener listener` | The listener to be added. |

### addAudioCodecParametersChangeListener

```
public void addAudioCodecParametersChangeListener(
    CodecParametersChangeListener listener,
    List<String> keys
)
```

Adds a listener for audio codec parameter changes.

The listener will be called on the application thread. Upon registration, the listener will be immediately called with the last known values for the subscribed keys.

The default `https://developer.android.com/reference/android/media/MediaCodec.html` based renderers only support this feature on API level 29 and above.

**Note:** When used with `https://developer.android.com/reference/android/media/MediaCodec.html`, observing vendor-specific parameter changes requires API level 31 or higher. On API levels 29 and 30, any requested vendor-specific keys will be ignored.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener` to add. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> keys` | The list of parameter keys to subscribe to. |

### addAudioOffloadListener

```
public void addAudioOffloadListener(ExoPlayer.AudioOffloadListener listener)
```

Adds a listener to receive audio offload events.

This method can be called from any thread.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.AudioOffloadListener listener` | The listener to register. |

### addMediaSource

```
public void addMediaSource(MediaSource mediaSource)
```

Adds a media source to the end of the playlist.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource` | The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` to add. |

### addMediaSource

```
public void addMediaSource(int index, MediaSource mediaSource)
```

Adds a media source at the given index of the playlist.

| Parameters |
|---|---|
| `int index` | The index at which to add the source. |
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource` | The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` to add. |

### addMediaSources

```
public void addMediaSources(List<MediaSource> mediaSources)
```

Adds a list of media sources to the end of the playlist.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources` | The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` to add. |

### addMediaSources

```
public void addMediaSources(int index, List<MediaSource> mediaSources)
```

Adds a list of media sources at the given index of the playlist.

| Parameters |
|---|---|
| `int index` | The index at which to add the media sources. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources` | The `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` to add. |

### addVideoCodecParametersChangeListener

```
public void addVideoCodecParametersChangeListener(
    CodecParametersChangeListener listener,
    List<String> keys
)
```

Adds a listener for video codec parameter changes.

The listener will be called on the application thread. Upon registration, the listener will be immediately called with the last known values for the subscribed keys.

The default `https://developer.android.com/reference/android/media/MediaCodec.html` based renderers only support this feature on API level 29 and above.

**Note:** When used with `https://developer.android.com/reference/android/media/MediaCodec.html`, observing vendor-specific parameter changes requires API level 31 or higher. On API levels 29 and 30, any requested vendor-specific keys will be ignored.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener` to add. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html> keys` | The list of parameter keys to subscribe to. |

### addVideoFrameMetadataListener

```
public void addVideoFrameMetadataListener(VideoFrameMetadataListener listener)
```

Adds a listener to receive video frame metadata events.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener` | The listener to add. |

### clearAuxEffectInfo

```
public void clearAuxEffectInfo()
```

Detaches any previously attached auxiliary audio effect from the underlying audio track.

### clearCameraMotionListener

```
public void clearCameraMotionListener(CameraMotionListener listener)
```

Clears the listener which receives camera motion events if it matches the one passed. Else does nothing.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/spherical/CameraMotionListener listener` | The listener to clear. |

### clearVideoFrameMetadataListener

```
public void [clearVideoFrameMetadataListener](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#clearVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener))(VideoFrameMetadataListener listener)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` instead.

Clears the listener which receives video frame metadata events.

Calling this method is equivalent to calling `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener` | The listener to clear. |

### createMessage

```
public PlayerMessage createMessage(PlayerMessage.Target target)
```

Creates a message that can be sent to a `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage.Target`. By default, the message will be delivered immediately without blocking on the playback thread. The default `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage#getType()` is 0 and the default `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage#getPayload()` is null. If a position is specified with `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage#setPosition(long)`, the message will be delivered at this position in the current media item defined by `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentMediaItemIndex()`. Alternatively, the message can be sent at a specific mediaItem using `https://developer.android.com/reference/androidx/media3/exoplayer/PlayerMessage#setPosition(int,long)`.

### getAnalyticsCollector

```
public AnalyticsCollector getAnalyticsCollector()
```

Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsCollector` used for collecting analytics events.

### getAudioDecoderCounters

```
public @Nullable DecoderCounters getAudioDecoderCounters()
```

Returns `https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` for audio, or null if no audio is being played.

### getAudioFormat

```
public @Nullable Format getAudioFormat()
```

Returns the audio format currently being played, or null if no audio is being played.

### getAudioSessionId

```
public int getAudioSessionId()
```

Returns the audio session identifier, or `https://developer.android.com/reference/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if not set.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onAudioSessionIdChanged(int)` |   |

### getClock

```
public Clock getClock()
```

Returns the `https://developer.android.com/reference/androidx/media3/common/util/Clock` used for playback.

This method can be called from any thread.

### getCurrentTrackGroups

```
public TrackGroupArray [getCurrentTrackGroups](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getCurrentTrackGroups())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTracks()`.

### getCurrentTrackSelections

```
public TrackSelectionArray [getCurrentTrackSelections](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#getCurrentTrackSelections())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#getCurrentTracks()`.

### getPauseAtEndOfMediaItems

```
public boolean getPauseAtEndOfMediaItems()
```

Returns whether the player pauses playback at the end of each media item.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setPauseAtEndOfMediaItems(boolean)` |   |

### getPlaybackLooper

```
public Looper getPlaybackLooper()
```

Returns the `https://developer.android.com/reference/android/os/Looper.html` associated with the playback thread.

This method may be called from any thread.

### getPlayerError

```
public ExoPlaybackException getPlayerError()
```

Returns the error that caused playback to fail. This is the same error that will have been reported via `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onPlayerError(androidx.media3.common.PlaybackException)` at the time of failure. It can be queried using this method until the player is re-prepared.

Note that this method will always return `null` if `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackState()` is not `https://developer.android.com/reference/androidx/media3/common/Player#STATE_IDLE()`.

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlaybackException` | The error, or `null`. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onPlayerError(androidx.media3.common.PlaybackException)` |   |

### getPreloadConfiguration

```
public ExoPlayer.PreloadConfiguration getPreloadConfiguration()
```

Returns the `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration`.

### getRenderer

```
public Renderer getRenderer(int index)
```

Returns the renderer at the given index.

| Parameters |
|---|---|
| `int index` | The index of the renderer. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` | The renderer at this index. |

### getRendererCount

```
public int getRendererCount()
```

Returns the number of renderers.

### getRendererType

```
public int getRendererType(int index)
```

Returns the track type that the renderer at a given index handles.

For example, a video renderer will return `https://developer.android.com/reference/androidx/media3/common/C#TRACK_TYPE_VIDEO()`, an audio renderer will return `https://developer.android.com/reference/androidx/media3/common/C#TRACK_TYPE_AUDIO()` and a text renderer will return `https://developer.android.com/reference/androidx/media3/common/C#TRACK_TYPE_TEXT()`.

| Parameters |
|---|---|
| `int index` | The index of the renderer. |

| Returns |
|---|---|
| `int` | The `https://developer.android.com/reference/androidx/media3/common/C.TrackType` that the renderer handles. |

### getScrubbingModeParameters

```
public ScrubbingModeParameters getScrubbingModeParameters()
```

Gets the parameters that control behavior in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`.

### getSecondaryRenderer

```
public Renderer getSecondaryRenderer(int index)
```

Returns the secondary renderer at the given index.

| Parameters |
|---|---|
| `int index` | The index of the secondary renderer. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` | The secondary renderer at this index, or null if there is no secondary renderer at this index. |

### getSeekParameters

```
public SeekParameters getSeekParameters()
```

Returns the currently active `https://developer.android.com/reference/androidx/media3/exoplayer/SeekParameters` of the player.

### getShuffleOrder

```
public ShuffleOrder getShuffleOrder()
```

Returns the shuffle order.

The `https://developer.android.com/reference/androidx/media3/exoplayer/source/ShuffleOrder` returned will have the same length as the current playlist (`https://developer.android.com/reference/androidx/media3/common/Player#getMediaItemCount()`).

### getSkipSilenceEnabled

```
public boolean getSkipSilenceEnabled()
```

Returns whether skipping silences in the audio stream is enabled.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onSkipSilenceEnabledChanged(boolean)` |   |

### getTrackSelector

```
public @Nullable TrackSelector getTrackSelector()
```

Returns the track selector that this player uses, or null if track selection is not supported.

### getVideoChangeFrameRateStrategy

```
public int getVideoChangeFrameRateStrategy()
```

Returns the `https://developer.android.com/reference/androidx/media3/common/C.VideoChangeFrameRateStrategy`.

### getVideoDecoderCounters

```
public @Nullable DecoderCounters getVideoDecoderCounters()
```

Returns `https://developer.android.com/reference/androidx/media3/exoplayer/DecoderCounters` for video, or null if no video is being played.

### getVideoFormat

```
public @Nullable Format getVideoFormat()
```

Returns the video format currently being played, or null if no video is being played.

### getVideoScalingMode

```
public int getVideoScalingMode()
```

Returns the `https://developer.android.com/reference/androidx/media3/common/C.VideoScalingMode`.

### isReleased

```
public boolean isReleased()
```

Returns whether `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#release()` has been called on the player.

This method is allowed to be called after `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#release()`.

### isScrubbingModeEnabled

```
public boolean isScrubbingModeEnabled()
```

Returns whether the player is optimized for scrubbing (many frequent seeks).

See `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`.

### isSleepingForOffload

```
public boolean isSleepingForOffload()
```

Returns whether the player has paused its main loop to save power in offload scheduling mode.

Offload scheduling mode should save significant power when the phone is playing offload audio with the screen off.

Offload scheduling is only enabled when playing an audio track in offload mode, which requires all the following:

- Audio offload rendering is enabled through `https://developer.android.com/reference/androidx/media3/common/TrackSelectionParameters.Builder#setAudioOffloadPreferences(androidx.media3.common.TrackSelectionParameters.AudioOffloadPreferences)`.
- An audio track is playing in a format that the device supports offloading (for example, MP3 or AAC).
- The `https://developer.android.com/reference/androidx/media3/exoplayer/audio/AudioSink` is playing with an offload `https://developer.android.com/reference/android/media/AudioTrack.html`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.AudioOffloadListener#onSleepingForOffloadChanged(boolean)` |   |

### isTunnelingEnabled

```
public boolean isTunnelingEnabled()
```

Returns whether [tunneling](https://source.android.com/devices/tv/multimedia-tunneling) is enabled for the currently selected tracks.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onTracksChanged(androidx.media3.common.Tracks)` |   |

### prepare

```
public void [prepare](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource))(MediaSource mediaSource)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource)` and `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#prepare()` instead.

### prepare

```
public void [prepare](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource,boolean,boolean))(
    MediaSource mediaSource,
    boolean resetPosition,
    boolean resetState
)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setMediaSource(androidx.media3.exoplayer.source.MediaSource,boolean)` and `https://developer.android.com/reference/androidx/media3/test/utils/StubPlayer#prepare()` instead.

### removeAnalyticsListener

```
public void removeAnalyticsListener(AnalyticsListener listener)
```

Removes an `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/analytics/AnalyticsListener listener` | The listener to be removed. |

### removeAudioCodecParametersChangeListener

```
public void removeAudioCodecParametersChangeListener(
    CodecParametersChangeListener listener
)
```

Removes a listener for audio codec parameter changes.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener` to remove. |

### removeAudioOffloadListener

```
public void removeAudioOffloadListener(ExoPlayer.AudioOffloadListener listener)
```

Removes a listener of audio offload events.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.AudioOffloadListener listener` | The listener to unregister. |

### removeVideoCodecParametersChangeListener

```
public void removeVideoCodecParametersChangeListener(
    CodecParametersChangeListener listener
)
```

Removes a listener for video codec parameter changes.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener listener` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParametersChangeListener` to remove. |

### removeVideoFrameMetadataListener

```
public void removeVideoFrameMetadataListener(VideoFrameMetadataListener listener)
```

Removes a listener to receive video frame metadata events.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener` | The listener to remove. |

### setAudioAttributes

```
public void setAudioAttributes(
    AudioAttributes audioAttributes,
    boolean handleAudioFocus
)
```

Sets the attributes for audio playback, used by the underlying audio track. If not set, the default audio attributes will be used. They are suitable for general media playback.

Setting the audio attributes during playback may introduce a short gap in audio output as the audio track is recreated. A new audio session id will also be generated.

If tunneling is enabled by the track selector, the specified audio attributes will be ignored, but they will take effect if audio is later played without tunneling.

If audio focus should be handled, the `https://developer.android.com/reference/androidx/media3/common/AudioAttributes#usage()` must be `https://developer.android.com/reference/androidx/media3/common/C#USAGE_MEDIA()` or `https://developer.android.com/reference/androidx/media3/common/C#USAGE_GAME()`. Other usages will throw an `https://developer.android.com/reference/java/lang/IllegalArgumentException.html`.

This method must only be called if `https://developer.android.com/reference/androidx/media3/common/Player#COMMAND_SET_AUDIO_ATTRIBUTES()` is `https://developer.android.com/reference/androidx/media3/common/Player#getAvailableCommands()`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/AudioAttributes audioAttributes` | The attributes to use for audio playback. |
| `boolean handleAudioFocus` | True if the player should handle audio focus, false otherwise. |

### setAudioCodecParameters

```
public void setAudioCodecParameters(CodecParameters codecParameters)
```

Sets a collection of parameters on the underlying audio codecs.

This method is asynchronous. The parameters will be applied to the audio renderers on the playback thread.

The default `https://developer.android.com/reference/android/media/MediaCodec.html` based renderers only support this feature on API level 29 and above. If an underlying decoder does not support a parameter, it will be ignored.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters codecParameters` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` to set. |

### setAudioSessionId

```
public void setAudioSessionId(int audioSessionId)
```

Sets the ID of the audio session to attach to the underlying `https://developer.android.com/reference/android/media/AudioTrack.html`.

The audio session ID can be generated using `https://developer.android.com/reference/androidx/media3/common/util/Util#generateAudioSessionId(android.content.Context)`.

| Parameters |
|---|---|
| `int audioSessionId` | The audio session ID, or `https://developer.android.com/reference/androidx/media3/common/C#AUDIO_SESSION_ID_UNSET()` if it should be generated by the framework. |

### setAuxEffectInfo

```
public void setAuxEffectInfo(AuxEffectInfo auxEffectInfo)
```

Sets information on an auxiliary audio effect to attach to the underlying audio track.

### setCameraMotionListener

```
public void setCameraMotionListener(CameraMotionListener listener)
```

Sets a listener of camera motion events.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/spherical/CameraMotionListener listener` | The listener. |

### setEnforceAdPlaybackOnTimelineRefresh

```
public void setEnforceAdPlaybackOnTimelineRefresh(
    boolean enforceAdPlaybackOnTimelineRefresh
)
```

Sets whether to enforce ad playback on timeline refresh.

If `true`, then an ad group resolved at or before the current playback position during a timeline refresh will be played. If `false`, then the resolved ad group will not play.

The default is `true`.

| Parameters |
|---|---|
| `boolean enforceAdPlaybackOnTimelineRefresh` | Whether to enforce ad playback on timeline refresh. |

### setForegroundMode

```
public void setForegroundMode(boolean foregroundMode)
```

Sets whether the player is allowed to keep holding limited resources such as video decoders, even when in the idle state. By doing so, the player may be able to reduce latency when starting to play another piece of content for which the same resources are required.

This mode should be used with caution, since holding limited resources may prevent other players of media components from acquiring them. It should only be enabled when *both* of the following conditions are true:

- The application that owns the player is in the foreground.
- The player is used in a way that may benefit from foreground mode. For this to be true, the same player instance must be used to play multiple pieces of content, and there must be gaps between the playbacks (i.e. `https://developer.android.com/reference/androidx/media3/common/Player#stop()` is called to halt one playback, and `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource)` is called some time later to start a new one).

Note that foreground mode is *not* useful for switching between content without gaps between the playbacks. For this use case `https://developer.android.com/reference/androidx/media3/common/Player#stop()` does not need to be called, and simply calling `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#prepare(androidx.media3.exoplayer.source.MediaSource)` for the new media will cause limited resources to be retained even if foreground mode is not enabled.

If foreground mode is enabled, it's the application's responsibility to disable it when the conditions described above no longer hold.

| Parameters |
|---|---|
| `boolean foregroundMode` | Whether the player is allowed to keep limited resources even when in the idle state. |

### setHandleAudioBecomingNoisy

```
public void setHandleAudioBecomingNoisy(boolean handleAudioBecomingNoisy)
```

Sets whether the player should pause automatically when audio is rerouted from a headset to device speakers. See the [audio becoming noisy](https://developer.android.com/guide/topics/media-apps/volume-and-earphones#becoming-noisy) documentation for more information.

| Parameters |
|---|---|
| `boolean handleAudioBecomingNoisy` | Whether the player should pause automatically when audio is rerouted from a headset to device speakers. |

### setImageOutput

```
public void setImageOutput(@Nullable ImageOutput imageOutput)
```

Sets the `https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput` where rendered images will be forwarded.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput imageOutput` | The `https://developer.android.com/reference/androidx/media3/exoplayer/image/ImageOutput`. May be null to clear a previously set image output. |

### setMaxSeekToPreviousPositionMs

```
public void setMaxSeekToPreviousPositionMs(long maxSeekToPreviousPositionMs)
```

Sets the maximum position for which `https://developer.android.com/reference/androidx/media3/common/Player#seekToPrevious()` seeks to the previous `https://developer.android.com/reference/androidx/media3/common/MediaItem`.

| Parameters |
|---|---|
| `long maxSeekToPreviousPositionMs` | The maximum position, in milliseconds. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `maxSeekToPreviousPositionMs` is negative. |

### setMediaSource

```
public void setMediaSource(MediaSource mediaSource)
```

Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` and resets the position to the default position.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |

### setMediaSource

```
public void setMediaSource(MediaSource mediaSource, boolean resetPosition)
```

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `boolean resetPosition` | Whether the playback position should be reset to the default position. If false, playback will start from the position defined by `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentMediaItemIndex()` and `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentPosition()`. |

### setMediaSource

```
public void setMediaSource(MediaSource mediaSource, long startPositionMs)
```

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource mediaSource` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `long startPositionMs` | The position in milliseconds to start playback from. If `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` is passed, the default position of the given media source is used. |

### setMediaSources

```
public void setMediaSources(List<MediaSource> mediaSources)
```

Clears the playlist, adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource` and resets the position to the default position.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |

### setMediaSources

```
public void setMediaSources(List<MediaSource> mediaSources, boolean resetPosition)
```

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `boolean resetPosition` | Whether the playback position should be reset to the default position in the first `https://developer.android.com/reference/androidx/media3/common/Timeline.Window`. If false, playback will start from the position defined by `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentMediaItemIndex()` and `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentPosition()`. |

### setMediaSources

```
public void setMediaSources(
    List<MediaSource> mediaSources,
    int startMediaItemIndex,
    long startPositionMs
)
```

Clears the playlist and adds the specified `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource> mediaSources` | The new `https://developer.android.com/reference/androidx/media3/exoplayer/source/MediaSource`. |
| `int startMediaItemIndex` | The media item index to start playback from. If `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()` is passed, the current position is not reset. |
| `long startPositionMs` | The position in milliseconds to start playback from. If `https://developer.android.com/reference/androidx/media3/common/C#TIME_UNSET()` is passed, the default position of the given media source is used. In any case, if `startMediaItemIndex` is set to `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()`, this parameter is ignored and the position is not reset at all. |

### setPauseAtEndOfMediaItems

```
public void setPauseAtEndOfMediaItems(boolean pauseAtEndOfMediaItems)
```

Sets whether to pause playback at the end of each media item.

This means the player will pause at the end of each window in the current `https://developer.android.com/reference/androidx/media3/common/Player#getCurrentTimeline()`. Listeners will be informed by a call to `https://developer.android.com/reference/androidx/media3/common/Player.Listener#onPlayWhenReadyChanged(boolean,int)` with the reason `https://developer.android.com/reference/androidx/media3/common/Player#PLAY_WHEN_READY_CHANGE_REASON_END_OF_MEDIA_ITEM()` when this happens.

| Parameters |
|---|---|
| `boolean pauseAtEndOfMediaItems` | Whether to pause playback at the end of each media item. |

### setPreferredAudioDevice

```
public void setPreferredAudioDevice(@Nullable AudioDeviceInfo audioDeviceInfo)
```

Sets the preferred audio device.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/media/AudioDeviceInfo.html audioDeviceInfo` | The preferred `https://developer.android.com/reference/android/media/AudioDeviceInfo.html`, or null to restore the default. |

### setPreloadConfiguration

```
public void setPreloadConfiguration(
    ExoPlayer.PreloadConfiguration preloadConfiguration
)
```

Sets the `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration` to configure playlist preloading.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.PreloadConfiguration preloadConfiguration` | The preload configuration. |

### setPriority

```
public void setPriority(@C.Priority int priority)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/C.Priority` for this player.

The priority may influence resource allocation between multiple players or other components running in the same app.

This priority is used for the `https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager`, if `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setPriorityTaskManager(androidx.media3.common.PriorityTaskManager)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.Priority int priority` | The `https://developer.android.com/reference/androidx/media3/common/C.Priority`. |

### setPriorityTaskManager

```
public void setPriorityTaskManager(
    @Nullable PriorityTaskManager priorityTaskManager
)
```

Sets a `https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager`, or null to clear a previously set priority task manager.

The priority set via `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setPriority(int)` (or `https://developer.android.com/reference/androidx/media3/common/C#PRIORITY_PLAYBACK()` will be set while the player is loading.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager priorityTaskManager` | The `https://developer.android.com/reference/androidx/media3/common/PriorityTaskManager`, or null to clear a previously set priority task manager. |

### setScrubbingModeEnabled

```
public void setScrubbingModeEnabled(boolean scrubbingModeEnabled)
```

Sets whether to optimize the player for scrubbing (many frequent seeks).

The player may consume more resources in this mode, so it should only be used for short periods of time in response to user interaction (e.g. dragging on a progress bar UI element).

During scrubbing mode playback is `https://developer.android.com/reference/androidx/media3/common/Player#getPlaybackSuppressionReason()` with `https://developer.android.com/reference/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_SCRUBBING()`.

| Parameters |
|---|---|
| `boolean scrubbingModeEnabled` | Whether scrubbing mode should be enabled. |

### setScrubbingModeParameters

```
public void setScrubbingModeParameters(
    ScrubbingModeParameters scrubbingModeParameters
)
```

Sets the parameters that control behavior in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setScrubbingModeEnabled(boolean)`.

### setSeekBackIncrementMs

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

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

| Parameters |
|---|---|
| `long seekBackIncrementMs` | The seek back increment, in milliseconds. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `seekBackIncrementMs` is non-positive. |

### setSeekForwardIncrementMs

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

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

| Parameters |
|---|---|
| `long seekForwardIncrementMs` | The seek forward increment, in milliseconds. |

| Throws |
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException.html` | If `seekForwardIncrementMs` is non-positive. |

### setSeekParameters

```
public void setSeekParameters(@Nullable SeekParameters seekParameters)
```

Sets the parameters that control how seek operations are performed.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/exoplayer/SeekParameters seekParameters` | The seek parameters, or `null` to use the defaults. |

### setShuffleOrder

```
public void setShuffleOrder(ShuffleOrder shuffleOrder)
```

Sets the shuffle order.

The `https://developer.android.com/reference/androidx/media3/exoplayer/source/ShuffleOrder` passed must have the same length as the current playlist (`https://developer.android.com/reference/androidx/media3/common/Player#getMediaItemCount()`).

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/source/ShuffleOrder shuffleOrder` | The shuffle order. |

### setSkipSilenceEnabled

```
public void setSkipSilenceEnabled(boolean skipSilenceEnabled)
```

Sets whether skipping silences in the audio stream is enabled.

| Parameters |
|---|---|
| `boolean skipSilenceEnabled` | Whether skipping silences in the audio stream is enabled. |

### setVideoChangeFrameRateStrategy

```
public void setVideoChangeFrameRateStrategy(int videoChangeFrameRateStrategy)
```

Sets a `https://developer.android.com/reference/androidx/media3/common/C.VideoChangeFrameRateStrategy` that will be used by the player when provided with a video output `https://developer.android.com/reference/android/view/Surface.html`.

The strategy only applies if a `https://developer.android.com/reference/android/media/MediaCodec.html`-based video `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` is enabled. Applications wishing to use `https://developer.android.com/reference/android/view/Surface.html#CHANGE_FRAME_RATE_ALWAYS` should set the mode to `https://developer.android.com/reference/androidx/media3/common/C#VIDEO_CHANGE_FRAME_RATE_STRATEGY_OFF()` to disable calls to `https://developer.android.com/reference/android/view/Surface.html#setFrameRate(float, int)` from ExoPlayer, and should then call `https://developer.android.com/reference/android/view/Surface.html#setFrameRate(float, int)` directly from application code.

| Parameters |
|---|---|
| `int videoChangeFrameRateStrategy` | A `https://developer.android.com/reference/androidx/media3/common/C.VideoChangeFrameRateStrategy`. |

### setVideoCodecParameters

```
public void setVideoCodecParameters(CodecParameters codecParameters)
```

Sets a collection of parameters on the underlying video codecs.

This method is asynchronous. The parameters will be applied to the video renderers on the playback thread.

The default `https://developer.android.com/reference/android/media/MediaCodec.html` based renderers only support this feature on API level 29 and above. If an underlying decoder does not support a parameter, it will be ignored.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters codecParameters` | The `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` to set. |

### setVideoEffects

```
public void setVideoEffects(List<Effect> videoEffects)
```

Sets a `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/media3/common/Effect` that will be applied to each video frame.

If `https://developer.android.com/reference/androidx/media3/common/Player#setVideoSurface(android.view.Surface)`, the output resolution needs to be signaled by passing a `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#createMessage(androidx.media3.exoplayer.PlayerMessage.Target)` to the `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` with type `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer#MSG_SET_VIDEO_OUTPUT_RESOLUTION()` after calling this method. For `https://developer.android.com/reference/android/view/SurfaceView.html`, `https://developer.android.com/reference/android/view/TextureView.html` and `https://developer.android.com/reference/android/view/SurfaceHolder.html` output this happens automatically.

Pass `https://developer.android.com/reference/androidx/media3/common/VideoFrameProcessor#REDRAW()` to force the effect pipeline to redraw the effects immediately. To accurately interleave redraws, listen to `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener#onVideoFrameAboutToBeRendered(long,long,androidx.media3.common.Format,android.media.MediaFormat)` events.

The following limitations exist for using `https://developer.android.com/reference/androidx/media3/common/Effect`:

- The `androidx.media3:media3-effect` module must be available on the runtime classpath. `androidx.media3:media3-exoplayer` does not explicitly depend on the effect module, so apps must make sure it's available themselves. It must be the same version as the rest of the `androidx.media3` modules being used by the app.
- This feature works only with the default `https://developer.android.com/reference/androidx/media3/exoplayer/video/MediaCodecVideoRenderer` and not custom or extension `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer`.
- This feature does not work with `https://developer.android.com/reference/androidx/media3/common/Effect` that update the frame timestamps.
- This feature does not work with DRM-protected content.
- This method must be called at least once before calling `https://developer.android.com/reference/androidx/media3/common/Player#prepare()` (in order to set up the effects pipeline). The effects can be changed during playback by subsequent calls to this method after `https://developer.android.com/reference/androidx/media3/common/Player#prepare()`.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/Effect> videoEffects` | The `https://developer.android.com/reference/java/util/List.html` of `https://developer.android.com/reference/androidx/media3/common/Effect` to apply. |

### setVideoFrameMetadataListener

```
public void [setVideoFrameMetadataListener](https://developer.android.com/reference/androidx/media3/test/utils/StubExoPlayer#setVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener))(VideoFrameMetadataListener listener)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#addVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` and `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` instead.

Sets a listener to receive video frame metadata events.

Calling this method is equivalent to calling `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#removeVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` for the listener previously set with this method (if any), and then calling `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#addVideoFrameMetadataListener(androidx.media3.exoplayer.video.VideoFrameMetadataListener)` with `listener` (if non-null).

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/video/VideoFrameMetadataListener listener` | The listener. |

### setVideoScalingMode

```
public void setVideoScalingMode(int videoScalingMode)
```

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

The scaling mode only applies if a `https://developer.android.com/reference/android/media/MediaCodec.html`-based video `https://developer.android.com/reference/androidx/media3/exoplayer/Renderer` is enabled and if the output surface is owned by a `https://developer.android.com/reference/android/view/SurfaceView.html`.

| Parameters |
|---|---|
| `int videoScalingMode` | The `https://developer.android.com/reference/androidx/media3/common/C.VideoScalingMode`. |

### setVirtualDeviceId

```
public void setVirtualDeviceId(int virtualDeviceId)
```

Sets the virtual device id to be used for playback.

Note that the initial value is obtained from `https://developer.android.com/reference/android/content/Context.html#getDeviceId()` from the `https://developer.android.com/reference/android/content/Context.html` passed to `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer.Builder#Builder(android.content.Context)`.

| Parameters |
|---|---|
| `int virtualDeviceId` | The `https://developer.android.com/reference/android/companion/virtual/VirtualDevice.html#getDeviceId()`, or `https://developer.android.com/reference/androidx/media3/common/C#INDEX_UNSET()` if unspecified. |

### setWakeMode

```
public void setWakeMode(int wakeMode)
```

Sets how the player should keep the device awake for playback when the screen is off.

Enabling this feature requires the `https://developer.android.com/reference/android/Manifest.permission.html#WAKE_LOCK` permission. It should be used together with a foreground `https://developer.android.com/reference/android/app/Service.html` for use cases where playback occurs and the screen is off (e.g. background audio playback). It is not useful when the screen will be kept on during playback (e.g. foreground video playback).

When enabled, the locks (`https://developer.android.com/reference/android/os/PowerManager.WakeLock.html` / `https://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html`) will be held whenever the player is in the `https://developer.android.com/reference/androidx/media3/common/Player#STATE_READY()` or `https://developer.android.com/reference/androidx/media3/common/Player#STATE_BUFFERING()` states with `playWhenReady = true`. The locks held depends on the specified `https://developer.android.com/reference/androidx/media3/common/C.WakeMode`.

| Parameters |
|---|---|
| `int wakeMode` | The `https://developer.android.com/reference/androidx/media3/common/C.WakeMode` option to keep the device awake during playback. |