Remove Participant
Remove participant allows removing participant while session is on-going. This can be helpful when moderation in particular meeting is required.
- Kotlin
- Java
val participant = meeting!!.participants.get("<participant-id>")
// This will emit an event called "onParticipantLeft" to that particular participant
participant.remove()
Participant participant = meeting.getParticipants().get("<participant-id>");
// Remove participant from active session
// This will emit an event called "onParticipantLeft" to that particular participant
participant.remove();
Events
onParticipantLeft - Removing participant will trigger onParticipantLeft
event.
- Kotlin
- Java
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
override fun onParticipantLeft(participant: Participant) {
// Triggers when a participant is removed or leaves the meeting.
Log.d("#meeting", participant.displayName + " left");
}
}
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
@Override
public void onParticipantLeft(Participant participant) {
// Triggers when a participant is removed or leaves the meeting.
Log.d("#meeting", participant.getDisplayName() + " left");
}
}