> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-v6-beta2-flutter-uikit.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Participant Actions

Manage other participants during an active call session. These methods allow you to mute participants, pause their video, and pin/unpin them in the call layout.

## Prerequisites

* An active [call session](/calls/flutter/join-session)
* Access to the `CallSession` instance
* Appropriate permissions (typically host/moderator privileges)

## Get CallSession Instance

Participant action methods are called on the `CallSession` singleton:

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

<Note>
  `CallSession.getInstance()` returns `null` if no active session exists. Always use the null-aware `?.` operator when calling methods.
</Note>

***

## Mute Participant

Mute a specific participant's audio. This prevents other participants from hearing them.

```dart theme={null}
String participantId = "participant_uid";
await CallSession.getInstance()?.muteParticipant(participantId);
```

| Parameter       | Type     | Description                                      |
| --------------- | -------- | ------------------------------------------------ |
| `participantId` | `String` | The unique identifier of the participant to mute |

<Note>
  When a participant is muted, all participants receive the `onParticipantAudioMuted(Participant)` callback on their `ParticipantEventListener`.
</Note>

***

## Pause Participant Video

Pause a specific participant's video feed. Other participants will see a placeholder instead of their video.

```dart theme={null}
String participantId = "participant_uid";
await CallSession.getInstance()?.pauseParticipantVideo(participantId);
```

| Parameter       | Type     | Description                                                   |
| --------------- | -------- | ------------------------------------------------------------- |
| `participantId` | `String` | The unique identifier of the participant whose video to pause |

<Note>
  When a participant's video is paused, all participants receive the `onParticipantVideoPaused(Participant)` callback on their `ParticipantEventListener`.
</Note>

***

## Pin Participant

Pin a participant to keep them prominently displayed in the call layout, regardless of who is speaking.

```dart theme={null}
await CallSession.getInstance()?.pinParticipant(participant.uid);
```

<Note>
  Pinning is particularly useful in Spotlight layout mode where you want to keep a specific participant in focus.
</Note>

***

## Unpin Participant

Remove the pin from a participant, returning to the default layout behavior.

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

***

## Listen for Participant Events

Register a `ParticipantEventListener` to receive callbacks when participant states change:

```dart theme={null}
CallSession.getInstance()?.addParticipantEventListener(ParticipantEventListeners(
  onParticipantJoined: (Participant participant) {
    debugPrint("${participant.name} joined the call");
  },
  onParticipantLeft: (Participant participant) {
    debugPrint("${participant.name} left the call");
  },
  onParticipantAudioMuted: (Participant participant) {
    debugPrint("${participant.name} was muted");
  },
  onParticipantAudioUnmuted: (Participant participant) {
    debugPrint("${participant.name} was unmuted");
  },
  onParticipantVideoPaused: (Participant participant) {
    debugPrint("${participant.name}'s video was paused");
  },
  onParticipantVideoResumed: (Participant participant) {
    debugPrint("${participant.name}'s video was resumed");
  },
  onParticipantListChanged: (List<Participant> participants) {
    debugPrint("Participant list updated: ${participants.length} participants");
    // Update your participant list UI
  },
  onDominantSpeakerChanged: (Participant participant) {
    debugPrint("Dominant speaker: ${participant.name}");
  },
));
```

<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 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:

```dart theme={null}
SessionSettings sessionSettings = CometChatCalls.SessionSettingsBuilder()
    .hideParticipantListButton(false)  // Show the participant list button
    .build();
```

***

## Participant List Button Click Listener

Listen for when users tap the participant list button:

```dart theme={null}
CallSession.getInstance()?.addButtonClickListener(ButtonClickListeners(
  onParticipantListButtonClicked: () {
    debugPrint("Participant list button clicked");
    // Show custom participant list UI if needed
  },
));
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Layout & UI" icon="table-cells" href="/calls/flutter/layout-ui">
    Control call layout and UI elements
  </Card>

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