fun CallLobby(modifier: Modifier = Modifier, call: Call, user: User = StreamVideo.instance().user, labelPosition: Alignment = Alignment.BottomStart, isCameraEnabled: Boolean = if (LocalInspectionMode.current) {
true
} else {
call.camera.isEnabled.value
}, isMicrophoneEnabled: Boolean = if (LocalInspectionMode.current) {
true
} else {
call.microphone.isEnabled.value
}, video: ParticipantState.Video = ParticipantState.Video(
sessionId = call.sessionId,
track = VideoTrack(
streamId = call.sessionId,
video = if (LocalInspectionMode.current) {
org.webrtc.VideoTrack(1000L)
} else {
call.camera.mediaManager.videoTrack
},
),
enabled = isCameraEnabled,
), permissions: VideoPermissionsState = rememberCallPermissionsState(call = call), onRendered: (View) -> Unit = {}, onRenderedContent: @Composable (video: ParticipantState.Video) -> Unit = {
OnRenderedContent(call = call, video = it, onRendered = onRendered)
}, onDisabledContent: @Composable () -> Unit = {
OnDisabledContent(user = user)
}, onCallAction: (CallAction) -> Unit = { DefaultOnCallActionHandler.onCallAction(call, it) }, lobbyControlsContent: @Composable (modifier: Modifier, call: Call) -> Unit = { modifier, call ->
ControlActions(
modifier = modifier,
call = call,
actions = buildDefaultLobbyControlActions(
call = call,
onCallAction = onCallAction,
isCameraEnabled = isCameraEnabled,
isMicrophoneEnabled = isMicrophoneEnabled,
),
)
}) Represents the UI in a preview call that renders a local video track to pre-display a video before joining a call.
Parameters
The call includes states and will be rendered with participants.
A user to display their name and avatar image on the preview.
The position of the user audio state label.
A participant video to render on the preview renderer.
Android permissions that should be required to render a video call properly.
A video renderer, which renders a local video track before joining a call.
Content is shown that a local camera is disabled. It displays user avatar by default.
Handler when the user triggers a Call Control Action.
Content is shown that allows users to trigger different actions to control a preview call.
An interface that will be invoked when the video is rendered.