Skip to content

Instantly share code, notes, and snippets.

@skydoves
Last active January 23, 2025 06:01
Show Gist options
  • Save skydoves/71ffc8fa3db6703838f7f267d34272fb to your computer and use it in GitHub Desktop.
Save skydoves/71ffc8fa3db6703838f7f267d34272fb to your computer and use it in GitHub Desktop.
list_actions
@Composable
public fun buildDefaultCallControlActions(
onCallAction: (CallAction) -> Unit,
): List<@Composable () -> Unit> {
return listOf(
{
ToggleCameraAction(
onCallAction = onCallAction,
)
},
{
ToggleMicrophoneAction(
onCallAction = onCallAction,
)
},
{
FlipCameraAction(
onCallAction = onCallAction,
)
},
)
}
@Composable
public fun ControlActions(
call: Call,
modifier: Modifier = Modifier,
onCallAction: (CallAction) -> Unit = { DefaultOnCallActionHandler.onCallAction(call, it) },
actions: List<(@Composable () -> Unit)> = buildDefaultCallControlActions(onCallAction)
) {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment