Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
data class RegularVideoRendererStyle(val isFocused: Boolean = false, val isScreenSharing: Boolean = false, val isShowingReactions: Boolean = true, val isShowingParticipantLabel: Boolean = true, val isShowingConnectionQualityIndicator: Boolean = true, val labelPosition: Alignment = Alignment.BottomStart, val reactionDuration: Int = 650, val reactionPosition: Alignment = Alignment.TopEnd) : VideoRendererStyle

A regular video renderer style, which displays the reactions, participant label, and connection quality indicator.

Link copied to clipboard
data class ScreenSharingVideoRendererStyle(val isFocused: Boolean = false, val isScreenSharing: Boolean = true, val isShowingReactions: Boolean = true, val isShowingParticipantLabel: Boolean = true, val isShowingConnectionQualityIndicator: Boolean = false, val labelPosition: Alignment = Alignment.BottomStart, val reactionDuration: Int = 1000, val reactionPosition: Alignment = Alignment.TopEnd) : VideoRendererStyle

A screen sharing video renderer style, which displays the reactions, and participant label.

Link copied to clipboard
data class SpotlightVideoRendererStyle(val isFocused: Boolean = false, val isScreenSharing: Boolean = false, val isShowingReactions: Boolean = true, val isShowingParticipantLabel: Boolean = true, val isShowingConnectionQualityIndicator: Boolean = true, val labelPosition: Alignment = Alignment.BottomStart, val reactionDuration: Int = 1000, val reactionPosition: Alignment = Alignment.TopEnd) : VideoRendererStyle

A spotlight video renderer style, which displays the reactions, and participant label.

Link copied to clipboard

Represents video call render styles.

Functions

Link copied to clipboard
fun ParticipantsLayout(call: Call, modifier: Modifier = Modifier, style: VideoRendererStyle = RegularVideoRendererStyle(), layoutType: LayoutType = LayoutType.DYNAMIC, videoRenderer: @Composable (modifier: Modifier, call: Call, participant: ParticipantState, style: VideoRendererStyle) -> Unit = { videoModifier, videoCall, videoParticipant, videoStyle -> ParticipantVideo( modifier = videoModifier, call = videoCall, participant = videoParticipant, style = videoStyle, ) }, floatingVideoRenderer: @Composable BoxScope.(call: Call, IntSize) -> Unit? = null)

Renders all the participants, based on the number of people in a call and the call state. Also takes into account if there are any screen sharing sessions active and adjusts the UI accordingly.

Link copied to clipboard
fun ParticipantsRegularGrid(modifier: Modifier = Modifier, call: Call, style: VideoRendererStyle = RegularVideoRendererStyle(), videoRenderer: @Composable (modifier: Modifier, call: Call, participant: ParticipantState, style: VideoRendererStyle) -> Unit = { videoModifier, videoCall, videoParticipant, videoStyle -> ParticipantVideo( modifier = videoModifier, call = videoCall, participant = videoParticipant, style = videoStyle, ) }, floatingVideoRenderer: @Composable BoxScope.(call: Call, IntSize) -> Unit? = null)

Renders the participants are joining in a call when there are no screen sharing sessions, based on the orientation.

Link copied to clipboard
fun ParticipantsScreenSharing(call: Call, session: ScreenSharingSession, modifier: Modifier = Modifier, isZoomable: Boolean = true, style: VideoRendererStyle = ScreenSharingVideoRendererStyle(), videoRenderer: @Composable (modifier: Modifier, call: Call, participant: ParticipantState, style: VideoRendererStyle) -> Unit = { videoModifier, videoCall, videoParticipant, videoStyle -> ParticipantVideo( modifier = videoModifier, call = videoCall, participant = videoParticipant, style = videoStyle, ) })

Renders all the CallParticipants, based on the number of people in a call and the call state. Also takes into account if there are any screen sharing sessions active and adjusts the UI accordingly.

Link copied to clipboard
fun ParticipantsSpotlight(call: Call, modifier: Modifier = Modifier, isZoomable: Boolean = false, style: VideoRendererStyle = SpotlightVideoRendererStyle(), videoRenderer: @Composable (modifier: Modifier, call: Call, participant: ParticipantState, style: VideoRendererStyle) -> Unit = { videoModifier, videoCall, videoParticipant, videoStyle -> ParticipantVideo( modifier = videoModifier, call = videoCall, participant = videoParticipant, style = videoStyle, ) })

Renders all the CallParticipants, based on the number of people in a call and the call state. Also takes into account if there are any screen sharing sessions active and adjusts the UI accordingly.

Link copied to clipboard
fun ParticipantVideo(call: Call, participant: ParticipantState, modifier: Modifier = Modifier, style: VideoRendererStyle = RegularVideoRendererStyle(), labelContent: @Composable BoxScope.(ParticipantState) -> Unit = { ParticipantLabel(call, participant, style.labelPosition) }, connectionIndicatorContent: @Composable BoxScope.(NetworkQuality) -> Unit = { NetworkQualityIndicator( networkQuality = it, modifier = Modifier .align(BottomEnd) .height(VideoTheme.dimens.componentHeightM), ) }, scalingType: VideoScalingType = VideoScalingType.SCALE_ASPECT_FILL, videoFallbackContent: @Composable (Call) -> Unit = { val userName by participant.userNameOrId.collectAsStateWithLifecycle() val userImage by participant.image.collectAsStateWithLifecycle() UserAvatarBackground(userImage = userImage, userName = userName) }, reactionContent: @Composable BoxScope.(ParticipantState) -> Unit = { DefaultReaction( participant = participant, style = style, ) }, actionsContent: @Composable BoxScope.(actions: List<ParticipantAction>, call: Call, participant: ParticipantState) -> Unit = { actions, call, participant -> ParticipantActions( Modifier .align(TopStart) .padding(8.dp), actions, call, participant, ) })

Renders a single participant with a given call, which contains all the call states. Also displays participant information with a label and connection quality indicator.

Link copied to clipboard
fun ParticipantVideoRenderer(call: Call, participant: ParticipantState, scalingType: VideoScalingType = VideoScalingType.SCALE_ASPECT_FILL, videoFallbackContent: @Composable (Call) -> Unit = { val userName by participant.userNameOrId.collectAsStateWithLifecycle() val userImage by participant.image.collectAsStateWithLifecycle() UserAvatarBackground(userImage = userImage, userName = userName) })

Renders a single participant with a given call, which contains all the call states. Also displays participant information with a label and connection quality indicator.

Inherited functions

Link copied to clipboard
fun VideoRendererStyle.copy(isFocused: Boolean = this.isFocused, isScreenSharing: Boolean = this.isScreenSharing, isShowingReactions: Boolean = this.isShowingReactions, isShowingParticipantLabel: Boolean = this.isShowingParticipantLabel, isShowingConnectionQualityIndicator: Boolean = this.isShowingConnectionQualityIndicator, labelPosition: Alignment = this.labelPosition, reactionDuration: Int = this.reactionDuration, reactionPosition: Alignment = this.reactionPosition): VideoRendererStyle

Represents video call render styles.

Link copied to clipboard
fun BoxScope.FloatingParticipantVideo(modifier: Modifier = Modifier, call: Call, participant: ParticipantState, parentBounds: IntSize, alignment: Alignment = Alignment.TopEnd, style: VideoRendererStyle = RegularVideoRendererStyle(isShowingConnectionQualityIndicator = false), videoRenderer: @Composable (ParticipantState) -> Unit = { ParticipantVideo( modifier = Modifier .fillMaxSize() .clip(VideoTheme.shapes.dialog), call = call, participant = participant, style = style, ) })

Represents a floating item used to feature a participant video, usually the local participant. This component must be used inside Box.

Link copied to clipboard
fun BoxScope.ParticipantLabel(call: Call, participant: ParticipantState, labelPosition: Alignment = BottomStart, soundIndicatorContent: @Composable RowScope.() -> Unit = { val audioEnabled by participant.audioEnabled.collectAsStateWithLifecycle() val audioLevel by if (participant.isLocal) { call.localMicrophoneAudioLevel.collectAsStateWithLifecycle() } else { participant.audioLevel.collectAsStateWithLifecycle() } SoundIndicator( // we always draw the audio indicator for the local participant for lower delay // and for now don't draw the indicator for other participants due to the lag // (so we ingore participant.isSpeaking) isSpeaking = participant.isLocal, isAudioEnabled = audioEnabled, audioLevel = audioLevel, modifier = Modifier .align(CenterVertically) .padding( vertical = VideoTheme.dimens.spacingXs, horizontal = VideoTheme.dimens.spacingS, ), ) })
fun BoxScope.ParticipantLabel(nameLabel: String, isPinned: Boolean = false, labelPosition: Alignment = BottomStart, hasAudio: Boolean = false, isSpeaking: Boolean = false, audioLevel: Float = 0.0f, soundIndicatorContent: @Composable RowScope.() -> Unit = { SoundIndicator( isSpeaking = isSpeaking, isAudioEnabled = hasAudio, audioLevel = audioLevel, modifier = Modifier .align(CenterVertically) .padding(horizontal = VideoTheme.dimens.spacingS), ) })