ParticipantVideo
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.
Parameters
call
The call that contains all the participants state and tracks.
participant
Participant to render.
modifier
Modifier for styling.
style
Defined properties for styling a single video call track.
labelContent
Content is shown that displays participant's name and device states.
connectionIndicatorContent
Content is shown that indicates the connection quality.
videoFallbackContent
Content is shown the video track is failed to load or not available.
reactionContent
Content is shown for the reaction.
actionsContent
Content to show action picker with call actions related to the selected participant.