> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feat-rn-pin-save-thread-subscription-uik.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Participant Management

> Manage CometChat Calls SDK v5 participants on Flutter with mute, pause video, pinning, permissions, and participant events.

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.

<Note>
  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.
</Note>

## Mute a Participant

Mute a specific participant's audio. This affects the participant for all users in the call.

```dart theme={null}
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.

```dart theme={null}
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.

```dart theme={null}
CallSession? callSession = CallSession.getInstance();

// Pin a participant
await callSession?.pinParticipant(participant.uid);

// Unpin (returns to automatic speaker highlighting)
await callSession?.unPinParticipant();
```

<Note>
  Pinning a participant only affects your local view. Other participants can pin different users independently.
</Note>

## Listen for Participant Events

Monitor participant state changes using `ParticipantEventListeners`:

```dart theme={null}
class _ParticipantEventListener extends ParticipantEventListeners {
  @override
  void onParticipantJoined(Participant participant) {
    debugPrint("${participant.name} joined the call");
    updateParticipantList();
  }

  @override
  void onParticipantLeft(Participant participant) {
    debugPrint("${participant.name} left the call");
    updateParticipantList();
  }

  @override
  void onParticipantListChanged(List<Participant> participants) {
    debugPrint("Participant count: ${participants.length}");
    refreshParticipantList(participants);
  }

  @override
  void onParticipantAudioMuted(Participant participant) {
    debugPrint("${participant.name} was muted");
    updateMuteIndicator(participant, muted: true);
  }

  @override
  void onParticipantAudioUnmuted(Participant participant) {
    debugPrint("${participant.name} was unmuted");
    updateMuteIndicator(participant, muted: false);
  }

  @override
  void onParticipantVideoPaused(Participant participant) {
    debugPrint("${participant.name} video paused");
    showParticipantAvatar(participant);
  }

  @override
  void onParticipantVideoResumed(Participant participant) {
    debugPrint("${participant.name} video resumed");
    showParticipantVideo(participant);
  }

  @override
  void onDominantSpeakerChanged(Participant participant) {
    debugPrint("${participant.name} is now speaking");
    highlightActiveSpeaker(participant);
  }
  // every other callback already defaults to a no-op on the abstract class —
  // override only what you need (onParticipantHandRaised, onParticipantHandLowered, onParticipantStartedScreenShare, onParticipantStoppedScreenShare, …).
}

CallSession? callSession = CallSession.getInstance();

callSession?.addParticipantEventListener(_ParticipantEventListener());
```

<Note>
  Flutter listeners are not lifecycle-aware. You must manually remove listeners in your widget's `dispose()` method to prevent memory leaks.
</Note>

## Participant Object

The `Participant` object contains information about each call participant:

| Property              | Type   | Description                                      |
| --------------------- | ------ | ------------------------------------------------ |
| `uid`                 | String | Unique identifier (CometChat user ID)            |
| `name`                | String | Display name                                     |
| `avatar`              | String | URL of avatar image                              |
| `pid`                 | String | Participant ID for this call session             |
| `role`                | String | Role in the call                                 |
| `audioMuted`          | bool   | Whether audio is muted                           |
| `videoPaused`         | bool   | Whether video is paused                          |
| `isPinned`            | bool   | Whether pinned in layout                         |
| `isPresenting`        | bool   | Whether screen sharing                           |
| `raisedHandTimestamp` | int    | Timestamp when hand was raised (0 if not raised) |

## Hide Participant List Button

To hide the participant list button in the call UI:

```dart theme={null}
SessionSettings sessionSettings = SessionSettingsBuilder()
    .hideParticipantListButton(true)
    .build();
```

<CardGroup cols={2}>
  <Card title="Participant Actions" icon="user-gear" href="/calls/flutter/participant-actions">
    Mute, pause video, and pin participants programmatically
  </Card>

  <Card title="Participant Event Listener" icon="bell" href="/calls/flutter/participant-event-listener">
    Handle all participant events
  </Card>
</CardGroup>
