Skip to main content
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.
val callSession = CallSession.getInstance()
callSession.muteParticipant(participant.uid)

Pause Participant Video

Pause a specific participant’s video. This affects the participant for all users in the call.
val callSession = CallSession.getInstance()
callSession.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.
val callSession = CallSession.getInstance()

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

// Unpin (returns to automatic speaker highlighting)
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:
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) {}
})

Participant Object

The Participant object contains information about each call participant:
PropertyTypeDescription
uidStringUnique identifier (CometChat user ID)
nameStringDisplay name
avatarStringURL of avatar image
pidStringParticipant ID for this call session
roleStringRole in the call
audioMutedBooleanWhether audio is muted
videoPausedBooleanWhether video is paused
isPinnedBooleanWhether pinned in layout
isPresentingBooleanWhether screen sharing
raisedHandTimestampLongTimestamp when hand was raised (0 if not raised)

Hide Participant List Button

To hide the participant list button in the call UI:
val sessionSettings = CometChatCalls.SessionSettingsBuilder()
    .hideParticipantListButton(true)
    .build()