Skip to main content
Version: Next

Remove Participant - React Native

This feature in a meeting allows the meeting host or organizer to remove a participant from the meeting. This can be helpful in situations where a participant is causing a disturbance, is behaving inappropriately, or is not following meeting guidelines.

VideoSDK provide three ways to remove participant from meeting.

  1. Using SDK
  2. Using VideoSDK Dashboard
  3. Using Rest API

1. Using SDK

remove()

Remove participant allows removing participant while session is on-going. This can be helpful when moderation in particular meeting is required.

import { useParticipant } from "@videosdk.live/react-native-sdk";
import { TouchableOpacity, Text } from "react-native";

const ParticipantView = () => {
// Get specific participant instance
const { remove } = useParticipant("<participant-id>");

const onPress = () => {
// Remove participant from active session
// This will emit an event called "onParticipantLeft" to that particular participant
remove();
};
return (
<>
<TouchableOpacity
onPress={() => {
handleRemoveParticipant();
}}
>
<Text>Remove Participant</Text>
</TouchableOpacity>
</>
);
};

Events associated with remove

Following callbacks are received when a participant is removed from the meeting.

2. Using VideoSDK Dashboard

  • You can go the session page on VideoSDK Dashboard and select the meeting you can to remove a participant from.
  • And then from the participants list you can remove any participant you want.

3. Using Rest API

  • You can also remove the particular participant from the meeting using the REST API.
  • To use this method, you should have the sessionId of the meeting and participantId of the participant who is supposed to be removed.

API Reference

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord