# WearUnsuitableOutputPlaybackSuppressionResolverListener

# WearUnsuitableOutputPlaybackSuppressionResolverListener

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener "View this page in Java")

<br />

```
@UnstableApi
class WearUnsuitableOutputPlaybackSuppressionResolverListener : Player.Listener
```

<br />

*** ** * ** ***

A[Player.Listener](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener)that launches a system dialog in response to[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())to allow the user to connect a suitable audio output. Also, it auto-resumes the playback when the playback suppression reason is changed from[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())to[PLAYBACK_SUPPRESSION_REASON_NONE](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_NONE()).

This listener only reacts to[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())on Wear OS devices, while being no-op for non-Wear OS devices.

The system dialog will be the[Media Output Switcher](https://developer.android.com/media/routing#output-switcher)if it is available on the device, or otherwise the Bluetooth settings screen.

This implementation also pauses playback before opening the system dialog. If the user connects a suitable media output within the specified timeout, playback resumes automatically. During this timeout, a power wakelock of the[PARTIAL_WAKE_LOCK](https://developer.android.com/reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK())level is obtained to prevent the system from freezing the app.

## Summary

|                                     ### Constants                                     |
|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS()) The default timeout for auto-resume of suppressed playback when the playback suppression reason as[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())is removed, in milliseconds. |

|                                                                                                                                                                                                                                                                                               ### Public constructors                                                                                                                                                                                                                                                                                                |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [WearUnsuitableOutputPlaybackSuppressionResolverListener](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#WearUnsuitableOutputPlaybackSuppressionResolverListener(android.content.Context))`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` `)` Creates a new instance.                                                                                                                                                                                                                  |
| [WearUnsuitableOutputPlaybackSuppressionResolverListener](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#WearUnsuitableOutputPlaybackSuppressionResolverListener(android.content.Context,long))`(` ` context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!,` ` autoResumeTimeoutMs: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) `)` Creates a new instance. |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onEvents](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#onEvents(androidx.media3.common.Player,androidx.media3.common.Player.Events))`(player: `[Player](https://developer.android.com/reference/kotlin/androidx/media3/common/Player)`!, events: `[Player.Events](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Events)`!)` Called when one or more player states changed. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.media3.common.Player.Listener](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener) |-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAudioAttributesChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onAudioAttributesChanged(androidx.media3.common.AudioAttributes))`(audioAttributes: `[AudioAttributes](https://developer.android.com/reference/kotlin/androidx/media3/common/AudioAttributes)`!)` Called when the value of[getAudioAttributes](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getAudioAttributes())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [onAudioSessionIdChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onAudioSessionIdChanged(int))`(audioSessionId: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the audio session ID changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onAvailableCommandsChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onAvailableCommandsChanged(androidx.media3.common.Player.Commands))`(availableCommands: `[Player.Commands](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Commands)`!)` Called when the value returned from[isCommandAvailable](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#isCommandAvailable(int))changes for at least one[Command](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command).                                                                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onCues](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onCues(androidx.media3.common.text.CueGroup))`(cueGroup: `[CueGroup](https://developer.android.com/reference/kotlin/androidx/media3/common/text/CueGroup)`!)` Called when the value of[getCurrentCues](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getCurrentCues())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) ~~[onCues](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onCues(java.util.List<androidx.media3.common.text.Cue>))~~`(cues: (`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[Cue](https://developer.android.com/reference/kotlin/androidx/media3/common/text/Cue)`!>!)` **This function is deprecated.** Use[onCues](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onCues(androidx.media3.common.text.CueGroup))instead. <br />                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onDeviceInfoChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onDeviceInfoChanged(androidx.media3.common.DeviceInfo))`(deviceInfo: `[DeviceInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/DeviceInfo)`!)` Called when the device information changes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onDeviceVolumeChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onDeviceVolumeChanged(int,boolean))`(volume: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, muted: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when the value of[getDeviceVolume](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getDeviceVolume())or[isDeviceMuted](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#isDeviceMuted())changes.                                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onIsLoadingChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onIsLoadingChanged(boolean))`(isLoading: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when the player starts or stops loading the source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onIsPlayingChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onIsPlayingChanged(boolean))`(isPlaying: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when the value of[isPlaying](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#isPlaying())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) ~~[onLoadingChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onLoadingChanged(boolean))~~`(isLoading: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` **This function is deprecated.** Use[onIsLoadingChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onIsLoadingChanged(boolean))instead. <br />                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onMaxSeekToPreviousPositionChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMaxSeekToPreviousPositionChanged(long))`(maxSeekToPreviousPositionMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Called when the value of[getMaxSeekToPreviousPosition](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getMaxSeekToPreviousPosition())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onMediaItemTransition](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMediaItemTransition(androidx.media3.common.MediaItem,int))`(` ` mediaItem: `[MediaItem](https://developer.android.com/reference/kotlin/androidx/media3/common/MediaItem)`?,` ` @`[Player.MediaItemTransitionReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.MediaItemTransitionReason)` reason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when playback transitions to a media item or starts repeating a media item according to the current[repeat mode](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getRepeatMode()).                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onMediaMetadataChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMediaMetadataChanged(androidx.media3.common.MediaMetadata))`(mediaMetadata: `[MediaMetadata](https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata)`!)` Called when the value of[getMediaMetadata](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getMediaMetadata())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) [onMetadata](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMetadata(androidx.media3.common.Metadata))`(metadata: `[Metadata](https://developer.android.com/reference/kotlin/androidx/media3/common/Metadata)`!)` Called when there is metadata associated with the current playback time.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlayWhenReadyChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayWhenReadyChanged(boolean,int))`(` ` playWhenReady: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`,` ` @`[Player.PlayWhenReadyChangeReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlayWhenReadyChangeReason)` reason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when the value returned from[getPlayWhenReady](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlayWhenReady())changes.                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlaybackParametersChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackParametersChanged(androidx.media3.common.PlaybackParameters))`(playbackParameters: `[PlaybackParameters](https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackParameters)`!)` Called when the value of[getPlaybackParameters](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackParameters())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlaybackStateChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackStateChanged(int))`(@`[Player.State](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State)` playbackState: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the value returned from[getPlaybackState](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackState())changes.                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlaybackSuppressionReasonChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackSuppressionReasonChanged(int))`(` ` @`[Player.PlaybackSuppressionReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PlaybackSuppressionReason)` playbackSuppressionReason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when the value returned from[getPlaybackSuppressionReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaybackSuppressionReason())changes.                                                                                                                                                                                                                                                                                                             | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlayerError](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayerError(androidx.media3.common.PlaybackException))`(error: `[PlaybackException](https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException)`!)` Called when an error occurs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlayerErrorChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayerErrorChanged(androidx.media3.common.PlaybackException))`(error: `[PlaybackException](https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException)`?)` Called when the[PlaybackException](https://developer.android.com/reference/kotlin/androidx/media3/common/PlaybackException)returned by[getPlayerError](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlayerError())changes.                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) ~~[onPlayerStateChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayerStateChanged(boolean,int))~~`(` ` playWhenReady: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`,` ` @`[Player.State](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.State)` playbackState: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` **This function is deprecated.** Use[onPlaybackStateChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackStateChanged(int))and[onPlayWhenReadyChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayWhenReadyChanged(boolean,int))instead. <br /> | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPlaylistMetadataChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaylistMetadataChanged(androidx.media3.common.MediaMetadata))`(mediaMetadata: `[MediaMetadata](https://developer.android.com/reference/kotlin/androidx/media3/common/MediaMetadata)`!)` Called when the value of[getPlaylistMetadata](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getPlaylistMetadata())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UnstableApi](https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi) ~~[onPositionDiscontinuity](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPositionDiscontinuity(int))~~`(@`[Player.DiscontinuityReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.DiscontinuityReason)` reason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` **This function is deprecated.** Use[onPositionDiscontinuity](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPositionDiscontinuity(androidx.media3.common.Player.PositionInfo,androidx.media3.common.Player.PositionInfo,int))instead. <br />                                                                                                                                                          | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onPositionDiscontinuity](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPositionDiscontinuity(androidx.media3.common.Player.PositionInfo,androidx.media3.common.Player.PositionInfo,int))`(` ` oldPosition: `[Player.PositionInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PositionInfo)`!,` ` newPosition: `[Player.PositionInfo](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.PositionInfo)`!,` ` @`[Player.DiscontinuityReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.DiscontinuityReason)` reason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when a position discontinuity occurs.                                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onRenderedFirstFrame](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onRenderedFirstFrame())`()` Called when 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onRepeatModeChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onRepeatModeChanged(int))`(@`[Player.RepeatMode](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode)` repeatMode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the value of[getRepeatMode](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getRepeatMode())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSeekBackIncrementChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onSeekBackIncrementChanged(long))`(seekBackIncrementMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Called when the value of[getSeekBackIncrement](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getSeekBackIncrement())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSeekForwardIncrementChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onSeekForwardIncrementChanged(long))`(seekForwardIncrementMs: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Called when the value of[getSeekForwardIncrement](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getSeekForwardIncrement())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onShuffleModeEnabledChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onShuffleModeEnabledChanged(boolean))`(shuffleModeEnabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when the value of[getShuffleModeEnabled](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getShuffleModeEnabled())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSkipSilenceEnabledChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onSkipSilenceEnabledChanged(boolean))`(skipSilenceEnabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Called when skipping silences is enabled or disabled in the audio stream.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSurfaceSizeChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onSurfaceSizeChanged(int,int))`(width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called each time there's a change in the size of the surface onto which the video is being rendered.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onTimelineChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onTimelineChanged(androidx.media3.common.Timeline,int))`(` ` timeline: `[Timeline](https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline)`!,` ` @`[Player.TimelineChangeReason](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.TimelineChangeReason)` reason: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Called when the value of[getCurrentTimeline](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getCurrentTimeline())changes.                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onTrackSelectionParametersChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onTrackSelectionParametersChanged(androidx.media3.common.TrackSelectionParameters))`(parameters: `[TrackSelectionParameters](https://developer.android.com/reference/kotlin/androidx/media3/common/TrackSelectionParameters)`!)` Called when the value returned from[getTrackSelectionParameters](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getTrackSelectionParameters())changes.                                                                                                                                                                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onTracksChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onTracksChanged(androidx.media3.common.Tracks))`(tracks: `[Tracks](https://developer.android.com/reference/kotlin/androidx/media3/common/Tracks)`!)` Called when the value of[getCurrentTracks](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getCurrentTracks())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onVideoSizeChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onVideoSizeChanged(androidx.media3.common.VideoSize))`(videoSize: `[VideoSize](https://developer.android.com/reference/kotlin/androidx/media3/common/VideoSize)`!)` Called each time when[getVideoSize](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getVideoSize())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onVolumeChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onVolumeChanged(float))`(volume: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Called when the value of[getVolume](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getVolume())changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | |

## Constants

### DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS

```
const val DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS: Long
```

The default timeout for auto-resume of suppressed playback when the playback suppression reason as[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())is removed, in milliseconds.  

## Public constructors

### WearUnsuitableOutputPlaybackSuppressionResolverListener

```
WearUnsuitableOutputPlaybackSuppressionResolverListener(
    context: Context!
)
```

Creates a new instance.

See[WearUnsuitableOutputPlaybackSuppressionResolverListener](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#WearUnsuitableOutputPlaybackSuppressionResolverListener(android.content.Context,long))for more details. The auto-resume timeout defaults to[DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS](https://developer.android.com/reference/kotlin/androidx/media3/ui/WearUnsuitableOutputPlaybackSuppressionResolverListener#DEFAULT_PLAYBACK_SUPPRESSION_AUTO_RESUME_TIMEOUT_MS()).  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|--------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | Any context. |

### WearUnsuitableOutputPlaybackSuppressionResolverListener

```
WearUnsuitableOutputPlaybackSuppressionResolverListener(
    context: Context!,
    autoResumeTimeoutMs: @IntRange(from = 0) Long
)
```

Creates a new instance.  

|                                                                                                Parameters                                                                                                 |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!`                                                                                                             | Any context.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `autoResumeTimeoutMs: @`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Duration in milliseconds after the playback suppression during which playback will be resumed automatically if the playback suppression reason is changed from[PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT())to[PLAYBACK_SUPPRESSION_REASON_NONE](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#PLAYBACK_SUPPRESSION_REASON_NONE()). Calling with`autoResumeTimeoutMs = 0`will cause playback to never resume automatically. |

## Public functions

### onEvents

```
fun onEvents(player: Player!, events: Player.Events!): Unit
```

Called when one or more player states changed.

State changes and events that happen within one[Looper](https://developer.android.com/reference/android/os/Looper.html)message queue iteration are reported together and only after all individual callbacks were triggered.

Listeners should prefer this method over individual callbacks in the following cases:

- They intend to trigger the same logic for multiple events (e.g. when updating a UI for both[onPlaybackStateChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackStateChanged(int))and[onPlayWhenReadyChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlayWhenReadyChanged(boolean,int))).
- They need access to the[Player](https://developer.android.com/reference/kotlin/androidx/media3/common/Player)object to trigger further events (e.g. to call[seekTo](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#seekTo(long))after a[onMediaItemTransition](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMediaItemTransition(androidx.media3.common.MediaItem,int))).
- They intend to use multiple state values together or in combination with[Player](https://developer.android.com/reference/kotlin/androidx/media3/common/Player)getter methods. For example using[getCurrentMediaItemIndex](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#getCurrentMediaItemIndex())with the`
  timeline`provided in[onTimelineChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onTimelineChanged(androidx.media3.common.Timeline,int))is only safe from within this method.
- They are interested in events that logically happened together (e.g[onPlaybackStateChanged](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onPlaybackStateChanged(int))to[STATE_BUFFERING](https://developer.android.com/reference/kotlin/androidx/media3/common/Player#STATE_BUFFERING())because of[onMediaItemTransition](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Listener#onMediaItemTransition(androidx.media3.common.MediaItem,int))).

|                                                    Parameters                                                     |
|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `player: `[Player](https://developer.android.com/reference/kotlin/androidx/media3/common/Player)`!`               | The[Player](https://developer.android.com/reference/kotlin/androidx/media3/common/Player)whose state changed. Use the getters to obtain the latest states.               |
| `events: `[Player.Events](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Events)`!` | The[Events](https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Events)that happened in this iteration, indicating which player states changed. |