# RepeatButton

## Functions summary

|---|---|
| `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/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/buttons/RepeatButton.composable#RepeatButton(androidx.media3.common.Player,kotlin.collections.List,kotlin.Function1)( player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?, toggleModeSequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/RepeatButtonState.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A state container for a button that cycles through repeat modes. |

## Functions

### RepeatButton

Artifact: [androidx.media3:media3-ui-compose](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/ui/compose/buttons/RepeatButton.kt+function:RepeatButton)

```
@UnstableApi
@Composable
fun RepeatButton(
    player: Player?,
    toggleModeSequence: List<@Player.RepeatMode Int> = listOf(Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL),
    content: @Composable RepeatButtonState.() -> Unit
): Unit
```

A state container for a button that cycles through repeat modes.

This composable manages the enabled state and click handling of a repeat button. The UI is provided by the `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/buttons/package-summary#RepeatButton(androidx.media3.common.Player,kotlin.collections.List,kotlin.Function1)` lambda, which has access to the `https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/RepeatButtonState`.

| Parameters |
|---|---|
| `player: https://developer.android.com/reference/kotlin/androidx/media3/common/Player?` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Player` to control. |
| `toggleModeSequence: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<@https://developer.android.com/reference/kotlin/androidx/media3/common/Player.RepeatMode https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html> = listOf(Player.REPEAT_MODE_OFF, Player.REPEAT_MODE_ONE, Player.REPEAT_MODE_ALL)` | The sequence of repeat modes to cycle through when the button is clicked. The default sequence is `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#REPEAT_MODE_OFF()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#REPEAT_MODE_ONE()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/Player#REPEAT_MODE_ALL()`. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/media3/ui/compose/state/RepeatButtonState.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The composable content to be displayed for the button. |