LiveButton

fun LiveButton(modifier: Modifier = Modifier, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, colors: ButtonColors = ButtonDefaults.colors(), liveThreshold: Double = 10.0, live: @Composable RowScope.() -> Unit = { LiveButtonContent(LocalPlayerColors.current.liveButtonLive) }, dvr: @Composable RowScope.() -> Unit = { LiveButtonContent(LocalPlayerColors.current.liveButtonDvr) })(source)

A button that shows whether the player is currently playing at the live point, and seeks to the live point when clicked.

Parameters

modifier

the Modifier to be applied to this button

contentPadding

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

colors

ButtonColors that resolve the colors for this button in different states. See ButtonDefaults.colors.

liveThreshold

the maximum distance (in seconds) from the live point that the player's current time can be for it to still be considered "at the live point"

live

button content when the player is playing at the live point, typically a red circle icon followed by the text "LIVE"

dvr

button content when the player is playing behind the live point, typically a gray circle icon followed by the text "LIVE"


fun LiveButton(state: LiveButtonState, modifier: Modifier = Modifier, contentPadding: PaddingValues = ButtonDefaults.ContentPadding, colors: ButtonColors = ButtonDefaults.colors(), live: @Composable RowScope.() -> Unit = { LiveButtonContent(LocalPlayerColors.current.liveButtonLive) }, dvr: @Composable RowScope.() -> Unit = { LiveButtonContent(LocalPlayerColors.current.liveButtonDvr) })(source)

A button that shows whether the player is currently playing at the live point, and seeks to the live point when clicked.

Parameters

state

the LiveButtonState to read and control

modifier

the Modifier to be applied to this button

contentPadding

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

colors

ButtonColors that resolve the colors for this button in different states. See ButtonDefaults.colors.

live

button content when the player is playing at the live point, typically a red circle icon followed by the text "LIVE"

dvr

button content when the player is playing behind the live point, typically a gray circle icon followed by the text "LIVE"