red-area-19627
06/05/2025, 6:51 PMtall-airline-16756
06/05/2025, 6:51 PMtall-airline-16756
06/05/2025, 6:52 PMroom(_:participantDidDisconnect:) method from the RoomDelegate protocol: func room(_ room: Room, participantDidDisconnect participant: RemoteParticipant) {
// Your action when a participant leaves
}
• Python: Register an event handler for the participant_disconnected event: def on_participant_disconnected(participant):
print(f"Participant disconnected: {participant.identity}")
# Your action when a participant leaves
room.on("participant_disconnected", on_participant_disconnected)
• Flutter: Listen for the ParticipantDisconnectedEvent emitted by the Room class when a RemoteParticipant leaves the room: // Listen for the event and implement your action when a participant leaves
Let me know if you need further assistance with implementing this! Sources: room(_:participantDidDisconnect:) | Documentation | livekit.rtc.room API documentation | ParticipantDisconnectedEvent class - livekit_client library - Dart API