CallLobby

fun CallLobby(modifier: Modifier = Modifier, call: Call, user: User = StreamVideo.instance().user, 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, paused = false, ), 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) }, videoPreviewModifier: Modifier = defaultVideoPreviewModifier(), participantLabelContent: @Composable BoxScope.() -> Unit = { DefaultParticipantLabel( user = user, isMicrophoneEnabled = isMicrophoneEnabled, labelPosition = Alignment.BottomStart, ) }, 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

modifier

Modifier for styling.

call

The call includes states and will be rendered with participants.

user

A user to display their name and avatar image on the preview.

video

A participant video to render on the preview renderer.

permissions

Android permissions that should be required to render a video call properly.

onRenderedContent

A video renderer, which renders a local video track before joining a call.

onDisabledContent

Content is shown that a local camera is disabled. It displays user avatar by default.

videoPreviewModifier

Modifier applied to the Box that wraps the local video preview. Defaults to a responsive height (180/280/200dp depending on screen size and orientation), full width, and a 12dp rounded corner clip. Override to provide custom size, shape, padding, or background — useful when the preview needs to match a host layout instead of the SDK's default sizing.

participantLabelContent

Slot for the participant label overlaid on the preview. Defaults to a label showing the user's name and microphone state at Alignment.BottomStart. Pass {} to hide the label entirely, or override to provide custom positioning and content (use BoxScope.align inside).

onCallAction

Handler when the user triggers a Call Control Action.

lobbyControlsContent

Content is shown that allows users to trigger different actions to control a preview call.

onRendered

An interface that will be invoked when the video is rendered.


fun CallLobby(modifier: Modifier = Modifier, call: Call, user: User = StreamVideo.instance().user, labelPosition: Alignment, 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, paused = false, ), 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, ), ) })

Deprecated

Use CallLobby with the participantLabelContent slot for full control over the lobby label. Pass `{}` to hide it, or override to customize content and position.

Replace with

CallLobby(modifier = modifier, call = call, user = user, isCameraEnabled = isCameraEnabled, isMicrophoneEnabled = isMicrophoneEnabled, video = video, permissions = permissions, onRendered = onRendered, onRenderedContent = onRenderedContent, onDisabledContent = onDisabledContent, onCallAction = onCallAction, lobbyControlsContent = lobbyControlsContent)