AmbientMediaControlButtons

fun AmbientMediaControlButtons(onPlayButtonClick: () -> Unit, onPauseButtonClick: () -> Unit, playPauseButtonEnabled: Boolean, playing: Boolean, leftButton: @Composable ButtonGroupScope.(MutableInteractionSource) -> Unit, rightButton: @Composable ButtonGroupScope.(MutableInteractionSource) -> Unit, modifier: Modifier = Modifier, colorScheme: ColorScheme = MaterialTheme.colorScheme)

Media control buttons for display in the ambient mode, showing AmbientPlayPauseButton button in the middle, and allows custom buttons to be passed for left and right.

Parameters

onPlayButtonClick

Callback invoked when the play button is clicked.

onPauseButtonClick

Callback invoked when the pause button is clicked.

playPauseButtonEnabled

Controls the enabled state of the play/pause button.

playing

Indicates whether the media is currently playing.

leftButton

Composable lambda that defines the left button. It receives a MutableInteractionSource to observe interactions.

rightButton

Composable lambda that defines the right button. It receives a MutableInteractionSource to observe interactions.

modifier

Optional Modifier to be applied to the button group.

colorScheme

The ColorScheme used to style the play/pause button. Defaults to MaterialTheme.colorScheme.


fun AmbientMediaControlButtons(playerUiState: PlayerUiState, onPlayButtonClick: () -> Unit, onPauseButtonClick: () -> Unit, onSeekToPreviousButtonClick: () -> Unit, onSeekToNextButtonClick: () -> Unit, modifier: Modifier = Modifier, colorScheme: ColorScheme = MaterialTheme.colorScheme)

Media control buttons for display in the ambient mode, showing AmbientPlayPauseButton button in the middle and AmbientSeekToPreviousButton and AmbientSeekToNextButton buttons on the sides.

Parameters

playerUiState

The PlayerUiState used to determine the state of the buttons.

onPlayButtonClick

Callback invoked when the play button is clicked.

onPauseButtonClick

Callback invoked when the pause button is clicked.

onSeekToPreviousButtonClick

Callback invoked when the seek to previous button is clicked.

onSeekToNextButtonClick

Callback invoked when the seek to next button is clicked.

modifier

Optional Modifier to be applied to the button group.

colorScheme

The ColorScheme used to style the buttons. Defaults to MaterialTheme.colorScheme.