> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Participant Management

> CometChat Calling SDK v5 - Participant Management for Android

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.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()
    callSession.muteParticipant(participant.uid)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();
    callSession.muteParticipant(participant.getUid());
    ```
  </Tab>
</Tabs>

## Pause Participant Video

Pause a specific participant's video. This affects the participant for all users in the call.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()
    callSession.pauseParticipantVideo(participant.uid)
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();
    callSession.pauseParticipantVideo(participant.getUid());
    ```
  </Tab>
</Tabs>

## 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.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()

    // Pin a participant
    callSession.pinParticipant(participant.uid)

    // Unpin (returns to automatic speaker highlighting)
    callSession.unPinParticipant()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();

    // Pin a participant
    callSession.pinParticipant(participant.getUid());

    // Unpin (returns to automatic speaker highlighting)
    callSession.unPinParticipant();
    ```
  </Tab>
</Tabs>

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

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()

    callSession.addParticipantEventListener(this, object : ParticipantEventListener() {
        override fun onParticipantJoined(participant: Participant) {
            Log.d(TAG, "${participant.name} joined the call")
            updateParticipantList()
        }

        override fun onParticipantLeft(participant: Participant) {
            Log.d(TAG, "${participant.name} left the call")
            updateParticipantList()
        }

        override fun onParticipantListChanged(participants: List<Participant>) {
            Log.d(TAG, "Participant count: ${participants.size}")
            refreshParticipantList(participants)
        }

        override fun onParticipantAudioMuted(participant: Participant) {
            Log.d(TAG, "${participant.name} was muted")
            updateMuteIndicator(participant, muted = true)
        }

        override fun onParticipantAudioUnmuted(participant: Participant) {
            Log.d(TAG, "${participant.name} was unmuted")
            updateMuteIndicator(participant, muted = false)
        }

        override fun onParticipantVideoPaused(participant: Participant) {
            Log.d(TAG, "${participant.name} video paused")
            showParticipantAvatar(participant)
        }

        override fun onParticipantVideoResumed(participant: Participant) {
            Log.d(TAG, "${participant.name} video resumed")
            showParticipantVideo(participant)
        }

        override fun onDominantSpeakerChanged(participant: Participant) {
            Log.d(TAG, "${participant.name} is now speaking")
            highlightActiveSpeaker(participant)
        }

        // Other callbacks...
        override fun onParticipantHandRaised(participant: Participant) {}
        override fun onParticipantHandLowered(participant: Participant) {}
        override fun onParticipantStartedScreenShare(participant: Participant) {}
        override fun onParticipantStoppedScreenShare(participant: Participant) {}
        override fun onParticipantStartedRecording(participant: Participant) {}
        override fun onParticipantStoppedRecording(participant: Participant) {}
    })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();

    callSession.addParticipantEventListener(this, new ParticipantEventListener() {
        @Override
        public void onParticipantJoined(Participant participant) {
            Log.d(TAG, participant.getName() + " joined the call");
            updateParticipantList();
        }

        @Override
        public void onParticipantLeft(Participant participant) {
            Log.d(TAG, participant.getName() + " left the call");
            updateParticipantList();
        }

        @Override
        public void onParticipantListChanged(List<Participant> participants) {
            Log.d(TAG, "Participant count: " + participants.size());
            refreshParticipantList(participants);
        }

        @Override
        public void onParticipantAudioMuted(Participant participant) {
            Log.d(TAG, participant.getName() + " was muted");
            updateMuteIndicator(participant, true);
        }

        @Override
        public void onParticipantAudioUnmuted(Participant participant) {
            Log.d(TAG, participant.getName() + " was unmuted");
            updateMuteIndicator(participant, false);
        }

        @Override
        public void onParticipantVideoPaused(Participant participant) {
            Log.d(TAG, participant.getName() + " video paused");
            showParticipantAvatar(participant);
        }

        @Override
        public void onParticipantVideoResumed(Participant participant) {
            Log.d(TAG, participant.getName() + " video resumed");
            showParticipantVideo(participant);
        }

        @Override
        public void onDominantSpeakerChanged(Participant participant) {
            Log.d(TAG, participant.getName() + " is now speaking");
            highlightActiveSpeaker(participant);
        }

        // Other callbacks...
    });
    ```
  </Tab>
</Tabs>

## 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`          | Boolean | Whether audio is muted                           |
| `videoPaused`         | Boolean | Whether video is paused                          |
| `isPinned`            | Boolean | Whether pinned in layout                         |
| `isPresenting`        | Boolean | Whether screen sharing                           |
| `raisedHandTimestamp` | Long    | Timestamp when hand was raised (0 if not raised) |

## Hide Participant List Button

To hide the participant list button in the call UI:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val sessionSettings = CometChatCalls.SessionSettingsBuilder()
        .hideParticipantListButton(true)
        .build()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    SessionSettings sessionSettings = new CometChatCalls.SessionSettingsBuilder()
        .hideParticipantListButton(true)
        .build();
    ```
  </Tab>
</Tabs>
