# CommandButton

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

*** ** * ** ***

<br />

```
class CommandButton
```

<br />

*** ** * ** ***

A button for a `https://developer.android.com/reference/kotlin/androidx/media3/session/SessionCommand` or `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` that can be displayed by controllers.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaSession#setCustomLayout(androidx.media3.session.MediaSession.ControllerInfo,java.util.List<androidx.media3.session.CommandButton>)` |   |
| `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController.Listener#onCustomLayoutChanged(androidx.media3.session.MediaController,java.util.List<androidx.media3.session.CommandButton>)` |   |

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton`. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi class https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.DisplayConstraints` Constraints for displaying a list of `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton` instances with utilities to resolve these constraints for a given list of buttons. |
| `class https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.DisplayConstraints.Builder` A builder for `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.DisplayConstraints`. |
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` An icon constant for a button. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = https://developer.android.com/reference/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` A slot at which a button can be displayed in a UI surface. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_ALBUM() = 57369` An icon showing an album symbol (a stylized LP record). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_ARTIST() = 57370` An icon showing an artist symbol (a stylized person with a musical note). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_BLOCK() = 57675` An icon showing a block symbol (a circle with a diagonal line). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_BOOKMARK_FILLED() = 1042534` An icon showing a filled bookmark symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_BOOKMARK_UNFILLED() = 59494` An icon showing an unfilled bookmark symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_CHECK_CIRCLE_FILLED() = 1042540` An icon showing a filled circle with a check mark. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_CHECK_CIRCLE_UNFILLED() = 59500` An icon showing a unfilled circle with a check mark. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_CLOSED_CAPTIONS() = 57372` An icon showing a closed caption symbol (a rectangle with the letters CC). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_CLOSED_CAPTIONS_OFF() = 61916` An icon showing a closed caption off symbol (a rectangle with the letters CC, with a large diagonal line across). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_FAST_FORWARD() = 57375` An icon showing a fast forward symbol (two right facing triangles). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_FEED() = 57573` An icon showing an feed symbol (a dot in the bottom-left with multiple concentric quarter circles). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_FLAG_FILLED() = 1040723` An icon showing a filled flag symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_FLAG_UNFILLED() = 57683` An icon showing an unfilled flag symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_HEART_FILLED() = 1042557` An icon showing a filled heart symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_HEART_UNFILLED() = 59517` An icon showing an unfilled heart symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_MINUS() = 57691` An icon showing a minus symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_MINUS_CIRCLE_FILLED() = 1040712` An icon showing a filled circle with a minus. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_MINUS_CIRCLE_UNFILLED() = 1040713` An icon showing an unfilled circle with a minus. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_NEXT() = 57412` An icon showing a next symbol (a right facing triangle with a vertical bar). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PAUSE() = 57396` An icon showing a pause symbol (two vertical bars). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAY() = 57399` An icon showing a play symbol (a right facing triangle). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED() = 57448` An icon showing a playback speed symbol (a right facing triangle in a circle with half-dashed, half-solid contour). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_0_5() = 62690` An icon showing a 0.5x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_0_8() = 1045730` An icon showing a 0.8x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_1_0() = 61389` An icon showing a 1.0x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_1_2() = 62689` An icon showing a 1.2x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_1_5() = 62688` An icon showing a 1.5x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_1_8() = 1045728` An icon showing a 1.8x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYBACK_SPEED_2_0() = 62699` An icon showing a 2.0x speed symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYLIST_ADD() = 57403` An icon showing an add to playlist symbol (multiple horizontal bars with a small plus). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLAYLIST_REMOVE() = 60288` An icon showing an remove from playlist symbol (multiple horizontal bars with a small minus). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLUS() = 57669` An icon showing a plus symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLUS_CIRCLE_FILLED() = 1040711` An icon showing a filled circle with a plus. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PLUS_CIRCLE_UNFILLED() = 57671` An icon showing an unfilled circle with a plus. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_PREVIOUS() = 57413` An icon showing a previous symbol (a left facing triangle with a vertical bar). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_QUALITY() = 58409` An icon showing a quality selection symbol (multiple horizontal bars with sliders). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_QUEUE_ADD() = 57436` An icon showing an add to queue symbol (a stylized TV with a plus). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_QUEUE_NEXT() = 57446` An icon showing a play next queue item symbol (a stylized TV with a plus and a right-facing arrow). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_QUEUE_REMOVE() = 57447` An icon showing a remove from queue symbol (a stylized TV with a minus). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_RADIO() = 58654` An icon showing a radio symbol (left and right facing sound waves). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_REPEAT_ALL() = 57408` An icon showing a repeat all symbol (two open clockwise arrows). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_REPEAT_OFF() = 1040448` An icon showing a disabled repeat symbol (two open clockwise arrows, in a color representing a disabled state). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_REPEAT_ONE() = 57409` An icon showing a repeat one symbol (two open clockwise arrows with an overlaid number 1). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_REWIND() = 57376` An icon showing a rewind symbol (two left facing triangles). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SETTINGS() = 59576` An icon showing a settings symbol (a stylized cog). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SHARE() = 59405` An icon showing a share symbol (three dots connected by two diagonal lines, open on the right). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SHUFFLE_OFF() = 1040452` An icon showing a disabled shuffle symbol (two diagonal upward and downward facing arrows, in a color representing a disabled state). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SHUFFLE_ON() = 57411` An icon showing a shuffle symbol (two diagonal upward and downward facing arrows). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SHUFFLE_STAR() = 1040451` An icon showing a shuffle symbol with a start (two diagonal upward and downward facing arrows with an overlaid star). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SIGNAL() = 61512` An icon showing an signal symbol (a vertical mast with circular sounds waves). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_BACK() = 57410` An icon showing a skip back symbol (an open anti-clockwise arrow). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_BACK_10() = 57433` An icon showing a skip back 10 seconds symbol (an open anti-clockwise arrow with the number 10). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_BACK_15() = 1040473` An icon showing a skip back 15 seconds symbol (an open anti-clockwise arrow with the number 15). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_BACK_30() = 57434` An icon showing a skip back 30 seconds symbol (an open anti-clockwise arrow with the number 30). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_BACK_5() = 57435` An icon showing a skip back 5 seconds symbol (an open anti-clockwise arrow with the number 5). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_FORWARD() = 63220` An icon showing a skip forward symbol (an open clock-wise arrow). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_FORWARD_10() = 57430` An icon showing a skip forward 10 seconds symbol (an open clockwise arrow with the number 10). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_FORWARD_15() = 1040470` An icon showing a skip forward 15 seconds symbol (an open clockwise arrow with the number 15). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_FORWARD_30() = 57431` An icon showing a skip forward 30 seconds symbol (an open clockwise arrow with the number 30). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SKIP_FORWARD_5() = 57432` An icon showing a skip forward 5 seconds symbol (an open clockwise arrow with the number 5). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_STAR_FILLED() = 1042488` An icon showing a filled star symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_STAR_UNFILLED() = 59448` An icon showing an unfilled star symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_STOP() = 57415` An icon showing a stop symbol (a square). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SUBTITLES() = 57416` An icon showing a subtitles symbol (a rectangle filled with dots and horizontal lines). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SUBTITLES_OFF() = 61298` An icon showing a subtitles off symbol (a rectangle filled with dots and horizontal lines, with a large diagonal line across). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_SYNC() = 58919` An icon showing a sync symbol (two open anti-clockwise arrows). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_THUMB_DOWN_FILLED() = 1042651` An icon showing a filled thumb-down symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_THUMB_DOWN_UNFILLED() = 59611` An icon showing an unfilled thumb-down symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_THUMB_UP_FILLED() = 1042652` An icon showing a filled thumb-up symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_THUMB_UP_UNFILLED() = 59612` An icon showing an unfilled thumb-up symbol. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_UNDEFINED() = 0` An icon constant representing an undefined icon, for example a custom icon not covered by the existing constants. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_VOLUME_DOWN() = 57421` An icon showing a volume down symbol (a stylized speaker with a single small sound wave). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_VOLUME_OFF() = 57423` An icon showing a volume off symbol (a stylized speaker with multiple sound waves, with a large diagonal line across). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_VOLUME_UP() = 57424` An icon showing a volume up symbol (a stylized speaker with multiple sound waves). |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_BACK() = 2` A slot in a playback control UI for backward-directed playback actions, most commonly used for previous or rewind actions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_BACK_SECONDARY() = 4` A slot in a playback control UI for secondary backward-directed playback actions, most commonly used for previous or rewind actions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_CENTRAL() = 1` A central slot in a playback control UI, most commonly used for play or pause actions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_FORWARD() = 3` A slot in a playback control UI for forward-directed playback actions, most commonly used for next or fast-forward actions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_FORWARD_SECONDARY() = 5` A slot in a playback control UI for secondary forward-directed playback actions, most commonly used for next or fast-forward actions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#SLOT_OVERFLOW() = 6` A slot in a playback control UI for additional actions that don't fit into other slots. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#canExecuteAction()()` Returns whether the command button has a configuration that allows to execute the associated action via a `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Checks the given command button for equality while ignoring `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#extras()`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#executeAction(androidx.media3.session.MediaController)(controller: https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController!)` Executes the intended action of the command button by calling the appropriate `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController` method. |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi [fromBundle](https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#fromBundle(android.os.Bundle))(bundle: https://developer.android.com/reference/android/os/Bundle.html!)` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#fromBundle(android.os.Bundle,int)` instead. <br /> |
| `java-static https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#fromBundle(android.os.Bundle,int)(bundle: https://developer.android.com/reference/android/os/Bundle.html!, interfaceVersion: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Restores a `CommandButton` from a `https://developer.android.com/reference/android/os/Bundle.html`. |
| `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi @https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#getDefaultSlot(int,int)( @https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command playerCommand: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon icon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Returns the default `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` for a button. |
| `java-static @https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#getIconResIdForIconConstant(int)(@https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon icon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns a drawable resource id for the given `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` constant. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#hashCode()()` |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi [toBundle](https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#toBundle())()` **This function is deprecated.** Use `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#toBundle(int)` instead. <br /> |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#toBundle(int)(interfaceVersion: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Writes this command button to a `https://developer.android.com/reference/android/os/Bundle.html`. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#displayName()` The display name of the button. |
| `https://developer.android.com/reference/android/os/Bundle.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#extras()` The extra `https://developer.android.com/reference/android/os/Bundle.html` of the button. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#icon()` The `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` of the button. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#iconResId()` The fallback icon resource ID of the button. |
| `https://developer.android.com/reference/android/net/Uri.html?` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#iconUri()` The fallback `https://developer.android.com/reference/android/content/ContentResolver.html#SCHEME_CONTENT` or `https://developer.android.com/reference/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE``https://developer.android.com/reference/android/net/Uri.html` for the icon of the button. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#isEnabled()` Whether the button is enabled. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` The optional parameter needed to execute the action associated with this button via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#executeAction(androidx.media3.session.MediaController)`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#playerCommand()` The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` command of the button. |
| `https://developer.android.com/reference/kotlin/androidx/media3/session/SessionCommand?` | `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#sessionCommand()` The session command of the button. |
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/primitives/ImmutableIntArray.html!` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/util/UnstableApi https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#slots()` The allowed `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` positions for this button. |

## Constants

### ICON_ALBUM

```
const val ICON_ALBUM = 57369: Int
```

An icon showing an album symbol (a stylized LP record).

### ICON_ARTIST

```
const val ICON_ARTIST = 57370: Int
```

An icon showing an artist symbol (a stylized person with a musical note).

### ICON_BLOCK

```
const val ICON_BLOCK = 57675: Int
```

An icon showing a block symbol (a circle with a diagonal line).

### ICON_BOOKMARK_FILLED

```
const val ICON_BOOKMARK_FILLED = 1042534: Int
```

An icon showing a filled bookmark symbol.

### ICON_BOOKMARK_UNFILLED

```
const val ICON_BOOKMARK_UNFILLED = 59494: Int
```

An icon showing an unfilled bookmark symbol.

### ICON_CHECK_CIRCLE_FILLED

```
const val ICON_CHECK_CIRCLE_FILLED = 1042540: Int
```

An icon showing a filled circle with a check mark.

### ICON_CHECK_CIRCLE_UNFILLED

```
const val ICON_CHECK_CIRCLE_UNFILLED = 59500: Int
```

An icon showing a unfilled circle with a check mark.

### ICON_CLOSED_CAPTIONS

```
const val ICON_CLOSED_CAPTIONS = 57372: Int
```

An icon showing a closed caption symbol (a rectangle with the letters CC).

### ICON_CLOSED_CAPTIONS_OFF

```
const val ICON_CLOSED_CAPTIONS_OFF = 61916: Int
```

An icon showing a closed caption off symbol (a rectangle with the letters CC, with a large diagonal line across).

### ICON_FAST_FORWARD

```
const val ICON_FAST_FORWARD = 57375: Int
```

An icon showing a fast forward symbol (two right facing triangles).

### ICON_FEED

```
const val ICON_FEED = 57573: Int
```

An icon showing an feed symbol (a dot in the bottom-left with multiple concentric quarter circles).

### ICON_FLAG_FILLED

```
const val ICON_FLAG_FILLED = 1040723: Int
```

An icon showing a filled flag symbol.

### ICON_FLAG_UNFILLED

```
const val ICON_FLAG_UNFILLED = 57683: Int
```

An icon showing an unfilled flag symbol.

### ICON_HEART_FILLED

```
const val ICON_HEART_FILLED = 1042557: Int
```

An icon showing a filled heart symbol.

### ICON_HEART_UNFILLED

```
const val ICON_HEART_UNFILLED = 59517: Int
```

An icon showing an unfilled heart symbol.

### ICON_MINUS

```
const val ICON_MINUS = 57691: Int
```

An icon showing a minus symbol.

### ICON_MINUS_CIRCLE_FILLED

```
const val ICON_MINUS_CIRCLE_FILLED = 1040712: Int
```

An icon showing a filled circle with a minus.

### ICON_MINUS_CIRCLE_UNFILLED

```
const val ICON_MINUS_CIRCLE_UNFILLED = 1040713: Int
```

An icon showing an unfilled circle with a minus.

### ICON_NEXT

```
const val ICON_NEXT = 57412: Int
```

An icon showing a next symbol (a right facing triangle with a vertical bar).

### ICON_PAUSE

```
const val ICON_PAUSE = 57396: Int
```

An icon showing a pause symbol (two vertical bars).

### ICON_PLAY

```
const val ICON_PLAY = 57399: Int
```

An icon showing a play symbol (a right facing triangle).

### ICON_PLAYBACK_SPEED

```
const val ICON_PLAYBACK_SPEED = 57448: Int
```

An icon showing a playback speed symbol (a right facing triangle in a circle with half-dashed, half-solid contour).

### ICON_PLAYBACK_SPEED_0_5

```
const val ICON_PLAYBACK_SPEED_0_5 = 62690: Int
```

An icon showing a 0.5x speed symbol.

### ICON_PLAYBACK_SPEED_0_8

```
const val ICON_PLAYBACK_SPEED_0_8 = 1045730: Int
```

An icon showing a 0.8x speed symbol.

### ICON_PLAYBACK_SPEED_1_0

```
const val ICON_PLAYBACK_SPEED_1_0 = 61389: Int
```

An icon showing a 1.0x speed symbol.

### ICON_PLAYBACK_SPEED_1_2

```
const val ICON_PLAYBACK_SPEED_1_2 = 62689: Int
```

An icon showing a 1.2x speed symbol.

### ICON_PLAYBACK_SPEED_1_5

```
const val ICON_PLAYBACK_SPEED_1_5 = 62688: Int
```

An icon showing a 1.5x speed symbol.

### ICON_PLAYBACK_SPEED_1_8

```
const val ICON_PLAYBACK_SPEED_1_8 = 1045728: Int
```

An icon showing a 1.8x speed symbol.

### ICON_PLAYBACK_SPEED_2_0

```
const val ICON_PLAYBACK_SPEED_2_0 = 62699: Int
```

An icon showing a 2.0x speed symbol.

### ICON_PLAYLIST_ADD

```
const val ICON_PLAYLIST_ADD = 57403: Int
```

An icon showing an add to playlist symbol (multiple horizontal bars with a small plus).

### ICON_PLAYLIST_REMOVE

```
const val ICON_PLAYLIST_REMOVE = 60288: Int
```

An icon showing an remove from playlist symbol (multiple horizontal bars with a small minus).

### ICON_PLUS

```
const val ICON_PLUS = 57669: Int
```

An icon showing a plus symbol.

### ICON_PLUS_CIRCLE_FILLED

```
const val ICON_PLUS_CIRCLE_FILLED = 1040711: Int
```

An icon showing a filled circle with a plus.

### ICON_PLUS_CIRCLE_UNFILLED

```
const val ICON_PLUS_CIRCLE_UNFILLED = 57671: Int
```

An icon showing an unfilled circle with a plus.

### ICON_PREVIOUS

```
const val ICON_PREVIOUS = 57413: Int
```

An icon showing a previous symbol (a left facing triangle with a vertical bar).

### ICON_QUALITY

```
const val ICON_QUALITY = 58409: Int
```

An icon showing a quality selection symbol (multiple horizontal bars with sliders).

### ICON_QUEUE_ADD

```
const val ICON_QUEUE_ADD = 57436: Int
```

An icon showing an add to queue symbol (a stylized TV with a plus).

### ICON_QUEUE_NEXT

```
const val ICON_QUEUE_NEXT = 57446: Int
```

An icon showing a play next queue item symbol (a stylized TV with a plus and a right-facing arrow).

### ICON_QUEUE_REMOVE

```
const val ICON_QUEUE_REMOVE = 57447: Int
```

An icon showing a remove from queue symbol (a stylized TV with a minus).

### ICON_RADIO

```
const val ICON_RADIO = 58654: Int
```

An icon showing a radio symbol (left and right facing sound waves).

### ICON_REPEAT_ALL

```
const val ICON_REPEAT_ALL = 57408: Int
```

An icon showing a repeat all symbol (two open clockwise arrows).

### ICON_REPEAT_OFF

```
const val ICON_REPEAT_OFF = 1040448: Int
```

An icon showing a disabled repeat symbol (two open clockwise arrows, in a color representing a disabled state).

### ICON_REPEAT_ONE

```
const val ICON_REPEAT_ONE = 57409: Int
```

An icon showing a repeat one symbol (two open clockwise arrows with an overlaid number 1).

### ICON_REWIND

```
const val ICON_REWIND = 57376: Int
```

An icon showing a rewind symbol (two left facing triangles).

### ICON_SETTINGS

```
const val ICON_SETTINGS = 59576: Int
```

An icon showing a settings symbol (a stylized cog).

### ICON_SHARE

```
const val ICON_SHARE = 59405: Int
```

An icon showing a share symbol (three dots connected by two diagonal lines, open on the right).

### ICON_SHUFFLE_OFF

```
const val ICON_SHUFFLE_OFF = 1040452: Int
```

An icon showing a disabled shuffle symbol (two diagonal upward and downward facing arrows, in a color representing a disabled state).

### ICON_SHUFFLE_ON

```
const val ICON_SHUFFLE_ON = 57411: Int
```

An icon showing a shuffle symbol (two diagonal upward and downward facing arrows).

### ICON_SHUFFLE_STAR

```
const val ICON_SHUFFLE_STAR = 1040451: Int
```

An icon showing a shuffle symbol with a start (two diagonal upward and downward facing arrows with an overlaid star).

### ICON_SIGNAL

```
const val ICON_SIGNAL = 61512: Int
```

An icon showing an signal symbol (a vertical mast with circular sounds waves).

### ICON_SKIP_BACK

```
const val ICON_SKIP_BACK = 57410: Int
```

An icon showing a skip back symbol (an open anti-clockwise arrow).

### ICON_SKIP_BACK_10

```
const val ICON_SKIP_BACK_10 = 57433: Int
```

An icon showing a skip back 10 seconds symbol (an open anti-clockwise arrow with the number 10).

### ICON_SKIP_BACK_15

```
const val ICON_SKIP_BACK_15 = 1040473: Int
```

An icon showing a skip back 15 seconds symbol (an open anti-clockwise arrow with the number 15).

### ICON_SKIP_BACK_30

```
const val ICON_SKIP_BACK_30 = 57434: Int
```

An icon showing a skip back 30 seconds symbol (an open anti-clockwise arrow with the number 30).

### ICON_SKIP_BACK_5

```
const val ICON_SKIP_BACK_5 = 57435: Int
```

An icon showing a skip back 5 seconds symbol (an open anti-clockwise arrow with the number 5).

### ICON_SKIP_FORWARD

```
const val ICON_SKIP_FORWARD = 63220: Int
```

An icon showing a skip forward symbol (an open clock-wise arrow).

### ICON_SKIP_FORWARD_10

```
const val ICON_SKIP_FORWARD_10 = 57430: Int
```

An icon showing a skip forward 10 seconds symbol (an open clockwise arrow with the number 10).

### ICON_SKIP_FORWARD_15

```
const val ICON_SKIP_FORWARD_15 = 1040470: Int
```

An icon showing a skip forward 15 seconds symbol (an open clockwise arrow with the number 15).

### ICON_SKIP_FORWARD_30

```
const val ICON_SKIP_FORWARD_30 = 57431: Int
```

An icon showing a skip forward 30 seconds symbol (an open clockwise arrow with the number 30).

### ICON_SKIP_FORWARD_5

```
const val ICON_SKIP_FORWARD_5 = 57432: Int
```

An icon showing a skip forward 5 seconds symbol (an open clockwise arrow with the number 5).

### ICON_STAR_FILLED

```
const val ICON_STAR_FILLED = 1042488: Int
```

An icon showing a filled star symbol.

### ICON_STAR_UNFILLED

```
const val ICON_STAR_UNFILLED = 59448: Int
```

An icon showing an unfilled star symbol.

### ICON_STOP

```
const val ICON_STOP = 57415: Int
```

An icon showing a stop symbol (a square).

### ICON_SUBTITLES

```
const val ICON_SUBTITLES = 57416: Int
```

An icon showing a subtitles symbol (a rectangle filled with dots and horizontal lines).

### ICON_SUBTITLES_OFF

```
const val ICON_SUBTITLES_OFF = 61298: Int
```

An icon showing a subtitles off symbol (a rectangle filled with dots and horizontal lines, with a large diagonal line across).

### ICON_SYNC

```
const val ICON_SYNC = 58919: Int
```

An icon showing a sync symbol (two open anti-clockwise arrows).

### ICON_THUMB_DOWN_FILLED

```
const val ICON_THUMB_DOWN_FILLED = 1042651: Int
```

An icon showing a filled thumb-down symbol.

### ICON_THUMB_DOWN_UNFILLED

```
const val ICON_THUMB_DOWN_UNFILLED = 59611: Int
```

An icon showing an unfilled thumb-down symbol.

### ICON_THUMB_UP_FILLED

```
const val ICON_THUMB_UP_FILLED = 1042652: Int
```

An icon showing a filled thumb-up symbol.

### ICON_THUMB_UP_UNFILLED

```
const val ICON_THUMB_UP_UNFILLED = 59612: Int
```

An icon showing an unfilled thumb-up symbol.

### ICON_UNDEFINED

```
const val ICON_UNDEFINED = 0: Int
```

An icon constant representing an undefined icon, for example a custom icon not covered by the existing constants.

### ICON_VOLUME_DOWN

```
const val ICON_VOLUME_DOWN = 57421: Int
```

An icon showing a volume down symbol (a stylized speaker with a single small sound wave).

### ICON_VOLUME_OFF

```
const val ICON_VOLUME_OFF = 57423: Int
```

An icon showing a volume off symbol (a stylized speaker with multiple sound waves, with a large diagonal line across).

### ICON_VOLUME_UP

```
const val ICON_VOLUME_UP = 57424: Int
```

An icon showing a volume up symbol (a stylized speaker with multiple sound waves).

### SLOT_BACK

```
@UnstableApi
const val SLOT_BACK = 2: Int
```

A slot in a playback control UI for backward-directed playback actions, most commonly used for previous or rewind actions.

### SLOT_BACK_SECONDARY

```
@UnstableApi
const val SLOT_BACK_SECONDARY = 4: Int
```

A slot in a playback control UI for secondary backward-directed playback actions, most commonly used for previous or rewind actions.

### SLOT_CENTRAL

```
@UnstableApi
const val SLOT_CENTRAL = 1: Int
```

A central slot in a playback control UI, most commonly used for play or pause actions.

### SLOT_FORWARD

```
@UnstableApi
const val SLOT_FORWARD = 3: Int
```

A slot in a playback control UI for forward-directed playback actions, most commonly used for next or fast-forward actions.

### SLOT_FORWARD_SECONDARY

```
@UnstableApi
const val SLOT_FORWARD_SECONDARY = 5: Int
```

A slot in a playback control UI for secondary forward-directed playback actions, most commonly used for next or fast-forward actions.

### SLOT_OVERFLOW

```
@UnstableApi
const val SLOT_OVERFLOW = 6: Int
```

A slot in a playback control UI for additional actions that don't fit into other slots.

## Public functions

### canExecuteAction

```
@UnstableApi
fun canExecuteAction(): Boolean
```

Returns whether the command button has a configuration that allows to execute the associated action via a `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController`. See `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#executeAction(androidx.media3.session.MediaController)` for a list of valid configurations.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#executeAction(androidx.media3.session.MediaController)` is successful assuming the associated `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` or `https://developer.android.com/reference/kotlin/androidx/media3/session/SessionCommand` is available. |

### equals

```
fun equals(obj: Any?): Boolean
```

Checks the given command button for equality while ignoring `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#extras()`.

### executeAction

```
@UnstableApi
fun executeAction(controller: MediaController!): Unit
```

Executes the intended action of the command button by calling the appropriate `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController` method.

The following player and session commands are supported. Whether the command button has a configuration that can be executed can also be checked with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#canExecuteAction()`.

If `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#playerCommand()` is set, the following commands are supported:

- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_PLAY_PAUSE()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setPlayWhenReady(boolean)` with `!controller.getPlayWhenReady()`, or with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_PREPARE()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#prepare()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_STOP()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#stop()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToPrevious()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToNext()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToPreviousMediaItem()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_NEXT_MEDIA_ITEM()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToNextMediaItem()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_BACK()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekBack()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_FORWARD()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekForward()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_DEFAULT_POSITION()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToDefaultPosition()`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekTo(long)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SEEK_TO_MEDIA_ITEM()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#seekToDefaultPosition(int)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_SPEED_AND_PITCH()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setPlaybackSpeed(float)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_SHUFFLE_MODE()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setShuffleModeEnabled(boolean)` with ` !controller.getShuffleModeEnabled()`, or with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_REPEAT_MODE()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setRepeatMode(int)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_MEDIA_ITEM()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setMediaItem(androidx.media3.common.MediaItem)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_PLAYLIST_METADATA()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setPlaylistMetadata(androidx.media3.common.MediaMetadata)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_VOLUME()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setVolume(float)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`, or calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#mute()`/`https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#unmute()` otherwise.
- `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_SET_TRACK_SELECTION_PARAMETERS()`: Calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setTrackSelectionParameters(androidx.media3.common.TrackSelectionParameters)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setPlayerCommand(int,java.lang.Object)`.

If `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#sessionCommand()` is set, the following commands are supported:

- If `sessionCommand.commandCode` is `https://developer.android.com/reference/kotlin/androidx/media3/session/SessionCommand#COMMAND_CODE_CUSTOM()`, calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#sendCustomCommand(androidx.media3.session.SessionCommand,android.os.Bundle)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#sessionCommand()` and `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#extras()`.
- If `sessionCommand.commandCode` is `https://developer.android.com/reference/kotlin/androidx/media3/session/SessionCommand#COMMAND_CODE_SESSION_SET_RATING()`, calls `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController#setRating(androidx.media3.common.Rating)` with `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#parameter()` if it is provided via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Builder#setSessionCommand(androidx.media3.session.SessionCommand,java.lang.Object)`.

Will do nothing if `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#isEnabled()` is `false`.

### fromBundle

```
@UnstableApi
java-static fun [fromBundle](https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#fromBundle(android.os.Bundle))(bundle: Bundle!): CommandButton!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#fromBundle(android.os.Bundle,int)` instead.

### fromBundle

```
@UnstableApi
java-static fun fromBundle(bundle: Bundle!, interfaceVersion: Int): CommandButton!
```

Restores a `CommandButton` from a `https://developer.android.com/reference/android/os/Bundle.html`.

### getDefaultSlot

```
@UnstableApi
@CommandButton.Slot
java-static fun getDefaultSlot(
    @Player.Command playerCommand: Int,
    @CommandButton.Icon icon: Int
): Int
```

Returns the default `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` for a button.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command playerCommand: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` associated with this button. |
| `@https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon icon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` of this button. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The default `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` for this button. |

### getIconResIdForIconConstant

```
@UnstableApi
java-static fun getIconResIdForIconConstant(@CommandButton.Icon icon: Int): @DrawableRes Int
```

Returns a drawable resource id for the given `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` constant.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon icon: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon`. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/DrawableRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The drawable resource if for the `icon`, or 0 if not found. |

### hashCode

```
fun hashCode(): Int
```

### toBundle

```
@UnstableApi
fun [toBundle](https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#toBundle())(): Bundle!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#toBundle(int)` instead.

### toBundle

```
@UnstableApi
fun toBundle(interfaceVersion: Int): Bundle!
```

Writes this command button to a `https://developer.android.com/reference/android/os/Bundle.html`.

| Parameters |
|---|---|
| `interfaceVersion: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/MediaLibraryInfo#INTERFACE_VERSION()` of the receiving process. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/os/Bundle.html!` | The `https://developer.android.com/reference/android/os/Bundle.html` containing the data of this instance. |

## Public properties

### displayName

```
val displayName: CharSequence!
```

The display name of the button. Can be empty if the command is predefined and a custom name isn't needed.

### extras

```
val extras: Bundle!
```

The extra `https://developer.android.com/reference/android/os/Bundle.html` of the button. It's private information between session and controller.

### icon

```
@CommandButton.Icon
val icon: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Icon` of the button.

### iconResId

```
val iconResId: @DrawableRes Int
```

The fallback icon resource ID of the button.

This is used when either the predefined `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#icon()` is not available, or it's set to `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_UNDEFINED()`.

Can be `0` if not needed.

### iconUri

```
val iconUri: Uri?
```

The fallback `https://developer.android.com/reference/android/content/ContentResolver.html#SCHEME_CONTENT` or `https://developer.android.com/reference/android/content/ContentResolver.html#SCHEME_ANDROID_RESOURCE``https://developer.android.com/reference/android/net/Uri.html` for the icon of the button.

This is used when either the predefined `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#icon()` is not available, or it's set to `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#ICON_UNDEFINED()`.

Can be `null`.

Note that this value can be used in addition to `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#iconResId()` for consumers that are capable of loading the content or resource `https://developer.android.com/reference/android/net/Uri.html`.

### isEnabled

```
val isEnabled: Boolean
```

Whether the button is enabled.

Note that this value will be set to `false` for `https://developer.android.com/reference/kotlin/androidx/media3/session/MediaController` instances if the corresponding command is not available to this controller (see `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#playerCommand()` and `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#sessionCommand()`).

### parameter

```
@UnstableApi
val parameter: Any?
```

The optional parameter needed to execute the action associated with this button via `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#executeAction(androidx.media3.session.MediaController)`.

### playerCommand

```
@Player.Command
val playerCommand: Int
```

The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player.Command` command of the button. Will be `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#COMMAND_INVALID()` if `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#sessionCommand()` is set.

### sessionCommand

```
val sessionCommand: SessionCommand?
```

The session command of the button. Will be `null` if `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton#playerCommand()` is set.

### slots

```
@UnstableApi
val slots: ImmutableIntArray!
```

The allowed `https://developer.android.com/reference/kotlin/androidx/media3/session/CommandButton.Slot` positions for this button.

The button is only allowed in the defined slots. If none of the slots can display the button, either because the slots do not exist, are already occupied or the UI surface does not allow the specific type of button in these slots, the button will not be displayed at all.

When multiple slots are provided, they define a preference order. The button will be placed in the first slot in the list that exists, isn't already occupied and that allows this type of button.