PlayButton

fun PlayButton(modifier: Modifier = Modifier, iconModifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), play: @Composable () -> Unit = { Icon( painter = painterResource(id = R.drawable.play), modifier = iconModifier, contentDescription = "Play" ) }, pause: @Composable () -> Unit = { Icon( painter = painterResource(id = R.drawable.pause), modifier = iconModifier, contentDescription = "Pause" ) }, replay: @Composable () -> Unit = { Icon( Icons.Rounded.Replay, modifier = iconModifier, contentDescription = "Replay" ) })

A button that toggles whether the player is playing or paused.

Parameters

modifier

the Modifier to be applied to this button

iconModifier

the Modifier to be applied to the Icons inside this button

contentPadding

the spacing values to apply internally between the container and the content

play

button content when the player is paused but not ended, typically a "play" icon

pause

button content when the player is playing, typically a "pause" icon

replay

button content when the player is paused and ended, typically a "replay" icon