Manage participants during a call with actions like muting, pausing video, and pinning. These features help maintain order in group calls and highlight important speakers.
By default, all participants who join a call have moderator access and can perform these actions. Implementing role-based moderation (e.g., restricting actions to hosts only) is the responsibility of the app developer based on their use case.
Mute a Participant
Mute a specific participant’s audio. This affects the participant for all users in the call.
await CallSession . getInstance () ? . muteParticipant (participant.uid);
Pause Participant Video
Pause a specific participant’s video. This affects the participant for all users in the call.
await CallSession . getInstance () ? . pauseParticipantVideo (participant.uid);
Pin a Participant
Pin a participant to keep them prominently displayed regardless of who is speaking. Useful for keeping focus on a presenter or important speaker.
CallSession ? callSession = CallSession . getInstance ();
// Pin a participant
await callSession ? . pinParticipant (participant.uid);
// Unpin (returns to automatic speaker highlighting)
await callSession ? . unPinParticipant ();
Pinning a participant only affects your local view. Other participants can pin different users independently.
Listen for Participant Events
Monitor participant state changes using ParticipantEventListener:
CallSession ? callSession = CallSession . getInstance ();
callSession ? . addParticipantEventListener ( ParticipantEventListener (
onParticipantJoined : ( Participant participant) {
debugPrint ( " ${ participant . name } joined the call" );
updateParticipantList ();
},
onParticipantLeft : ( Participant participant) {
debugPrint ( " ${ participant . name } left the call" );
updateParticipantList ();
},
onParticipantListChanged : ( List < Participant > participants) {
debugPrint ( "Participant count: ${ participants . length } " );
refreshParticipantList (participants);
},
onParticipantAudioMuted : ( Participant participant) {
debugPrint ( " ${ participant . name } was muted" );
updateMuteIndicator (participant, muted : true );
},
onParticipantAudioUnmuted : ( Participant participant) {
debugPrint ( " ${ participant . name } was unmuted" );
updateMuteIndicator (participant, muted : false );
},
onParticipantVideoPaused : ( Participant participant) {
debugPrint ( " ${ participant . name } video paused" );
showParticipantAvatar (participant);
},
onParticipantVideoResumed : ( Participant participant) {
debugPrint ( " ${ participant . name } video resumed" );
showParticipantVideo (participant);
},
onDominantSpeakerChanged : ( Participant participant) {
debugPrint ( " ${ participant . name } is now speaking" );
highlightActiveSpeaker (participant);
},
// Other callbacks...
onParticipantHandRaised : ( Participant participant) {},
onParticipantHandLowered : ( Participant participant) {},
onParticipantStartedScreenShare : ( Participant participant) {},
onParticipantStoppedScreenShare : ( Participant participant) {},
onParticipantStartedRecording : ( Participant participant) {},
onParticipantStoppedRecording : ( Participant participant) {},
));
Flutter listeners are not lifecycle-aware. You must manually remove listeners in your widget’s dispose() method to prevent memory leaks.
Participant Object
The Participant object contains information about each call participant:
Property Type Description uidString Unique identifier (CometChat user ID) nameString Display name avatarString URL of avatar image pidString Participant ID for this call session roleString Role in the call audioMutedbool Whether audio is muted videoPausedbool Whether video is paused isPinnedbool Whether pinned in layout isPresentingbool Whether screen sharing raisedHandTimestampint Timestamp when hand was raised (0 if not raised)
To hide the participant list button in the call UI:
SessionSettings sessionSettings = CometChatCalls . SessionSettingsBuilder ()
. hideParticipantListButton ( true )
. build ();
Participant Actions Mute, pause video, and pin participants programmatically
Participant Event Listener Handle all participant events