Remove Participant - React Native
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";
const ParticipantView = () => {
// Get specific participant instance
const { participants } = useParticipant("<participant-id>");
const onPress = () => {
// Remove participant from active session
// This will emit an event called "onParticipantLeft" to that particular participant
participant.remove();
};
return <>...</>;
};
Events
onParticipantLeft - Removing participant will trigger onParticipantLeft
event.
import { useMeeting, useParticipant } from "@videosdk.live/react-native-sdk";
/** useMeeting hooks events */
const {
/** Methods */
} = useMeeting({
onParticipantLeft: (participant) => {
// Triggers when a participant is removed or leaves the meeting.
},
});
Got a Question? Ask us on discord