updateParticipantVisibilityFlow
Set a flow to update the participants visibility. The flow should emit lists with currently visible participant session IDs.
Note: If you pass null to the parameter it will just cancel the currently observing flow.
E.g. Grid visible items info can be used to update the CallState
val gridState = rememberLazyGridState()
val updateFlow = snapshotFlow {
gridState.layoutInfo.visibleItemsInfo.map {
it.key // Assuming keys are sessionId
}
}
call.state.updateParticipantVisibilityFlow(updateFlow)
Content copied to clipboard
Parameters
flow
a flow that emits updates with list of visible participants.