Skip to main content
Version: 2.0.x

Leave or End Meeting - iOS

Participant can choose to leave the meeting without removing all the other participants. This is typically done by Leave Meeting.

Alternatively, if the participant is the host and the last person remaining in the session, they can choose End Meeting by removing all other participants, which will end the session for everyone.

leave()

To leave the meeting without removing all the participant you need to call leave() method of Meeting class.

end()

To leave the meeting by removing all the participant you need to call end() method of Meeting class.

note

This methods can be called after the meeting is joined successfully.

Example

@IBAction func leaveMeetingButtonTapped(_ sender: Any) {
// leave meeting
self.meeting?.leave()
}

@IBAction func endMeetingButtonTapped(_ sender: Any) {
// end meeting for everyone
self.meeting?.end()
}

Events associated with Leave

Following callbacks are received when a participant leaves the meeting.

Events associated with End

Following callbacks are received when a participant ends the meeting.

extension MeetingViewController: MeetingEventListener {
func onMeetingLeft() {

// remove listeners
meeting?.localParticipant.removeEventListener(self)
meeting?.removeEventListener(self)

print("You left the meeting")
}

func onParticipantLeft(_ participant: Participant) {

// remove listener
participant.removeEventListener(self)

print(participant.displayName, "just left the meeting")
}
}

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