fun PlayButton(modifier: Modifier = Modifier, iconModifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), play: @Composable () -> Unit = {
Icon(
painter = painterResource(R.drawable.play),
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_play),
)
}, pause: @Composable () -> Unit = {
Icon(
painter = painterResource(R.drawable.pause),
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_pause),
)
}, replay: @Composable () -> Unit = {
Icon(
Icons.Rounded.Replay,
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_replay),
)
})(source) A button that toggles whether the player is playing or paused.
the Modifier to be applied to this button
the spacing values to apply internally between the container and the content
button content when the player is paused but not ended, typically a "play" icon
button content when the player is playing, typically a "pause" icon
button content when the player is paused and ended, typically a "replay" icon
fun PlayButton(state: PlayButtonState, modifier: Modifier = Modifier, iconModifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), play: @Composable () -> Unit = {
Icon(
painter = painterResource(R.drawable.play),
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_play),
)
}, pause: @Composable () -> Unit = {
Icon(
painter = painterResource(R.drawable.pause),
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_pause),
)
}, replay: @Composable () -> Unit = {
Icon(
Icons.Rounded.Replay,
modifier = iconModifier,
contentDescription = stringResource(R.string.theoplayer_ui_btn_replay),
)
})(source) A button that toggles whether the player is playing or paused.
the Modifier to be applied to this button
the spacing values to apply internally between the container and the content
button content when the player is paused but not ended, typically a "play" icon
button content when the player is playing, typically a "pause" icon
button content when the player is paused and ended, typically a "replay" icon