Remove Participant - iOS
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​
remove()
​
Remove participant allows removing participant while session is on-going. This can be helpful when moderation in particular meeting is required.
- Swift
class MeetingViewController {
//Button when tapped will remove the participant with given participantID
@IBAction func removeParticipant(_ sender: Any) {
var participantID = "ABCD"
guard let index = self.participants.firstIndex(where: { $0.id == participantID }) else {
return
}
// remove participant from list
participants.remove(at: index)
}
Events associated with remove​
Following callbacks are received when a participant is removed from the meeting.
- Participant who was removed from the meeting will receive a callback on
onMeetingLeft
. - All other remote participants will receive a callback
onParticipantLeft
with Participant object.
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 andparticipantId
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