Manage Participants in a Session

Last updated Oct 19, 2026 Prerequisites

The local participant (for example, a host or moderator) must have the required Host Controls permissions enabled in their preset. For details, refer to Preset.

Use RealtimeKit host controls to manage other participants in a live session. You can mute audio or video, pin a participant, or remove participants from the session. These actions require specific host control permissions enabled in the local participant's Preset. Before you show UI controls or call these methods, verify that the local participant has the necessary permissions. In this guide, the local participant refers to the user performing the actions.

WebMobile

ReactWeb ComponentsAngular

Select a remote participant

To perform actions on a specific participant, you first need to retrieve their participant object. Remote participants (other participants) are available in meeting.participants. The local participant is available in meeting.self. Refer to Meeting Object Explained for details.

const joinedParticipants = meeting.participants.joined.toArray();
const participant = joinedParticipants[0];
if (!participant) {
    // No remote participants are currently joined.
}

To perform actions on a specific participant, you first need to retrieve their participant object. Remote participants (other participants) are available in meeting.participants. The local participant is available in meeting.self. Refer to Meeting Object Explained for details.

const joinedParticipants = meeting.participants.joined.toArray();
const participant = joinedParticipants[0];
if (!participant) {
    // No remote participants are currently joined.
}

To perform actions on a specific participant, you first need to retrieve their participant object. Remote participants (other participants) are available in meeting.participants. The local participant is available in meeting.self. Refer to Meeting Object Explained for details.

const joinedParticipants = meeting.participants.joined.toArray();
const participant = joinedParticipants[0];
if (!participant) {
    // No remote participants are currently joined.
}

To perform actions on a specific participant, retrieve their participant object from the participants property. Remote participants are available in meeting.participants.joined. The local participant is available in meeting.localUser.

val joinedParticipants = meeting.participants.joined
val participant = joinedParticipants.firstOrNull()
if (participant == null) {
    // No remote participants are currently joined.
}

To perform actions on a specific participant, retrieve their participant object from the participants property. Remote participants are available in meeting.participants.joined. The local participant is available in meeting.localUser.

let joinedParticipants = meeting.participants.joined
guard let participant = joinedParticipants.first else {
    // No remote participants are currently joined.
    return
}

To perform actions on a specific participant, retrieve their participant object from the participants property. Remote participants are available in meeting.participants.joined. The local participant is available in meeting.self.

const joinedParticipants = meeting.participants.joined;
const participant = joinedParticipants.toArray()[0];
if (!participant) {
    // No remote participants are currently joined.
}

Or use the useRealtimeKitSelector hook:

import { useRealtimeKitSelector } from '@cloudflare/realtimekit-react-native';

const joinedParticipants = useRealtimeKitSelector((m) => m.participants.joined);

Mute audio

Mute audio of participants when you need to manage background noise, moderate a classroom or webinar, or prevent interruptions during a session. This action requires the Mute Audio (disable_participant_audio) host control permission enabled in the local participant's preset.

Mute a participant

To mute a specific participant's audio:

  1. Check that the local participant has permission to mute other participants' audio.
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAudio()` on the target participant.

If the local participant does not have the required permission, `disableAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await participant.disableAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, the target participant's `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event.

**Option A**: Listen on the participant object

```ts
   participant.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the participant
   });
   ```

**Option B**: Listen on the `joined` map

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        if (participant.id === targetParticipantId) {
            // audioEnabled is false
            // Update UI for the participant
        }
    },
   );
   ```

1. Check that the local participant has permission to mute other participants' audio.

```ts
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAudio()` on the target participant.

If the local participant does not have the required permission, `disableAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await participant.disableAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, the target participant's `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event.

**Option A**: Listen on the participant object

```ts
   participant.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the participant
   });
   ```

**Option B**: Listen on the `joined` map

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        if (participant.id === targetParticipantId) {
            // audioEnabled is false
            // Update UI for the participant
        }
    },
   );
   ```

1. Check that the local participant has permission to mute other participants' audio.

```ts
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAudio()` on the target participant.

If the local participant does not have the required permission, `disableAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await participant.disableAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, the target participant's `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event.

**Option A**: Listen on the participant object

```ts
   participant.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the participant
   });
   ```

**Option B**: Listen on the `joined` map

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        if (participant.id === targetParticipantId) {
            // audioEnabled is false
            // Update UI for the participant
        }
    },
   );
   ```

1. Check that the local participant has permission to mute other participants' audio.

```kotlin
val canMuteAudio = meeting.localUser.permissions.host.canMuteAudio
if (!canMuteAudio) {
    // Disable the control in your UI.
}
  1. Call disableAudio() on the target participant. If the local participant does not have the required permission, disableAudio() returns a HostError.
val error = participant.disableAudio()
if (error != null) {
    // Handle error - permission denied.
}
  1. Handle the result by listening for updates. After the call succeeds, the target participant's audioEnabled becomes false.
meeting.addParticipantsEventListener(object : RtkParticipantsEventListener {
    override fun onAudioUpdate(participant: RtkRemoteParticipant, isEnabled: Boolean) {
        // audioEnabled is false
        // Update UI for the participant
    }
})
  1. Check that the local participant has permission to mute other participants' audio.
let canMuteAudio = meeting.localUser.permissions.host.canMuteAudio
if !canMuteAudio {
    // Disable the control in your UI.
}
  1. Call disableAudio() on the target participant. If the local participant does not have the required permission, disableAudio() returns a HostError.
if let error = participant.disableAudio() {
    // Handle error - permission denied.
}
  1. Handle the result by listening for updates. After the call succeeds, the target participant's audioEnabled becomes false.
extension MeetingViewModel: RtkParticipantsEventListener {
    func onAudioUpdate(participant: RtkRemoteParticipant, isEnabled: Bool) {
        // audioEnabled is false
        // Update UI for the participant
    }
}

// Register the listener
meeting.addParticipantsEventListener(participantsEventListener: self)
  1. Check that the local participant has permission to mute other participants' audio.
const canDisableParticipantAudio = meeting.self.permissions.canDisableParticipantAudio;
if (!canDisableParticipantAudio) {
    // Disable the control in your UI.
}
  1. Call disableAudio() on the target participant.
participant
    .disableAudio()
    .catch((err) => {
        // Handle error - permission denied or other issue.
        console.log(err);
    });
  1. Handle the result by listening for updates. After the call succeeds, the target participant's audioEnabled becomes false.
meeting.participants.joined.on('audioUpdate', (participant) => {
    // participant.audioEnabled is false
    // Update UI for the participant
});

Mute all participants

This affects all participants, including the local participant. To mute audio for all participants in the session:

  1. Check that the local participant has permission to mute other participants' audio.
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAllAudio()`.

If the local participant does not have the required permission, `disableAllAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await meeting.participants.disableAllAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, each participant’s `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event. The local participant also receives `audioUpdate` on `meeting.self`.

Listen to remote participant updates on the `joined` map:

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        // audioEnabled is false
        // Update UI for the participant
    },
   );
   ```

Listen to the local participant update on `meeting.self`:

```ts
   meeting.self.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the local participant
   });
   ```

1. Check that the local participant has permission to mute other participants' audio.

```ts
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAllAudio()`.

If the local participant does not have the required permission, `disableAllAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await meeting.participants.disableAllAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, each participant’s `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event. The local participant also receives `audioUpdate` on `meeting.self`.

Listen to remote participant updates on the `joined` map:

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        // audioEnabled is false
        // Update UI for the participant
    },
   );
   ```

Listen to the local participant update on `meeting.self`:

```ts
   meeting.self.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the local participant
   });
   ```

1. Check that the local participant has permission to mute other participants' audio.

```ts
   const canMuteAudio =
    meeting.self.permissions.canDisableParticipantAudio === true;
   if (!canMuteAudio) {
    // Disable the control in your UI.
   }
   ```

2. Call `disableAllAudio()`.

If the local participant does not have the required permission, `disableAllAudio()` throws a `ClientError` with code `1201`.

```ts
   try {
    await meeting.participants.disableAllAudio();
   } catch (err: any) {
    if (err?.code === 1201) {
        // The local participant does not have permission to mute other participants’ audio.
        return;
    }
    throw err;
   }
   ```

3. Handle the result by listening for updates.

After the call succeeds, each participant’s `audioEnabled` becomes `false`, and the SDK emits an `audioUpdate` event. The local participant also receives `audioUpdate` on `meeting.self`.

Listen to remote participant updates on the `joined` map:

```ts
   meeting.participants.joined.on(
    "audioUpdate",
    (participant, { audioEnabled, audioTrack }) => {
        // audioEnabled is false
        // Update UI for the participant
    },
   );
   ```

Listen to the local participant update on `meeting.self`:

```ts
   meeting.self.on("audioUpdate", ({ audioEnabled, audioTrack }) => {
    // audioEnabled is false
    // Update UI for the local participant
   });
   ```

1. Check that the local participant has permission to mute other participants' audio.

```kotlin
val canMuteAudio = meeting.localUser.permissions.host.canMuteAudio
if (!canMuteAudio) {
    // Disable the control in your UI.
}