# AudioFocusManager.PlayerControl

# AudioFocusManager.PlayerControl

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/common/audio/AudioFocusManager.PlayerControl "View this page in Java")

<br />

```
interface AudioFocusManager.PlayerControl
```

<br />

*** ** * ** ***

Interface to allow AudioFocusManager to give commands to a player.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [executePlayerCommand](https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioFocusManager.PlayerControl#executePlayerCommand(int))`(@`[AudioFocusManager.PlayerCommand](https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioFocusManager.PlayerCommand)` playerCommand: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when a command must be executed on the player. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [setVolumeMultiplier](https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioFocusManager.PlayerControl#setVolumeMultiplier(float))`(volumeMultiplier: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Called when the volume multiplier on the player should be changed.                                                                                                                               |

## Public functions

### executePlayerCommand

```
fun executePlayerCommand(@AudioFocusManager.PlayerCommand playerCommand: Int): Unit
```

Called when a command must be executed on the player.  

|                                                                                                                   Parameters                                                                                                                   |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `@`[AudioFocusManager.PlayerCommand](https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioFocusManager.PlayerCommand)` playerCommand: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The command that must be executed. |

### setVolumeMultiplier

```
fun setVolumeMultiplier(volumeMultiplier: Float): Unit
```

Called when the volume multiplier on the player should be changed.  

|                                             Parameters                                              |
|-----------------------------------------------------------------------------------------------------|----------------------------|
| `volumeMultiplier: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | The new volume multiplier. |