Leave or End Room - Flutter
Whenever participant wishes to end their communication in the room, they can simply leave the room.
This guide will provide an overview of how to implement leave or end feature in VideoSDK rooms.
- Leave - By using
leave()function, only a participant will leave/exit the room, the rest of the room will continue with other participants. - End - By using
end()function, room will end for each and every participant. So, use this function according to your use cases.
Leave And End Room
// Leave the room
room.leave();
// End Room Session
room.end();
Events
Events associated with leave():
- Local participant will receive a
roomLeftevent. - All remote participants will receive a
participantLeftevent withparticipantId.
Event associated with end():
- All participants and localParticipant, will be emitted with
roomLeftevent.
room.on(Events.roomLeft, () => {
//room Left
});
room.on(Events.participantLeft, (participant, Map<String,dynamic> reason) => {
//Participant Left the room
});
Got a Question? Ask us on discord

