Chromecast Button
fun ChromecastButton(modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(0.dp), availableIcon: @Composable () -> Unit = {
Icon(
Icons.Rounded.Cast,
contentDescription = "Start casting"
)
}, connectingIcon: @Composable () -> Unit = {
Icon(
Icons.Rounded.Cast,
contentDescription = "Stop casting"
)
}, connectedIcon: @Composable () -> Unit = {
Icon(
Icons.Rounded.CastConnected,
contentDescription = "Stop casting"
)
})
A button to start and stop casting using Chromecast.
Parameters
modifier
the Modifier to be applied to this button
content Padding
the spacing values to apply internally between the container and the content
available Icon
button content when Chromecast is available but not connected, typically a "start casting" icon
connecting Icon
button content while connecting to Chromecast, typically a "connecting to Chromecast" icon
connected Icon
button content when connected to Chromecast, typically a "stop casting" icon