Prerequisites
- An active call session
- Access to the
CallSessioninstance - Appropriate permissions (typically host/moderator privileges)
Get CallSession Instance
Participant action methods are called on theCallSession singleton:
CallSession.getInstance() returns null if no active session exists. Always use the null-aware ?. operator when calling methods.Mute Participant
Mute a specific participant’s audio. This prevents other participants from hearing them.| Parameter | Type | Description |
|---|---|---|
participantId | String | The unique identifier of the participant to mute |
When a participant is muted, all participants receive the
onParticipantAudioMuted(Participant) callback on their ParticipantEventListener.Pause Participant Video
Pause a specific participant’s video feed. Other participants will see a placeholder instead of their video.| Parameter | Type | Description |
|---|---|---|
participantId | String | The unique identifier of the participant whose video to pause |
When a participant’s video is paused, all participants receive the
onParticipantVideoPaused(Participant) callback on their ParticipantEventListener.Pin Participant
Pin a participant to keep them prominently displayed in the call layout, regardless of who is speaking.Pinning is particularly useful in Spotlight layout mode where you want to keep a specific participant in focus.
Unpin Participant
Remove the pin from a participant, returning to the default layout behavior.Listen for Participant Events
Register aParticipantEventListener to receive callbacks when participant states change:
Flutter listeners are not lifecycle-aware. You must manually remove listeners in your widget’s
dispose() method to prevent memory leaks.Participant Object
TheParticipant object contains information about a call participant:
| Property | Type | Description |
|---|---|---|
uid | String | Unique identifier of the participant |
name | String | Display name of the participant |
avatar | String | URL of the participant’s avatar image |
audioMuted | bool | Whether the participant’s audio is muted |
videoPaused | bool | Whether the participant’s video is paused |
isPinned | bool | Whether the participant is pinned in the layout |
Show/Hide Participant List Button
Control the visibility of the participant list button in the call UI:Participant List Button Click Listener
Listen for when users tap the participant list button:Next Steps
Layout & UI
Control call layout and UI elements
Participant Event Listener
Handle all participant events