Thank you for reaching out! When a participant is disconnected from a LiveKit room, the system emits a "Disconnected" event, and the connection state changes to "DISCONNECTED." Common reasons for this include:
•
DUPLICATE_IDENTITY: Another participant with the same identity joined the room.
•
ROOM_DELETED: The room was closed via the DeleteRoom API.
•
PARTICIPANT_REMOVED: You were removed from the room using the RemoveParticipant API.
•
JOIN_FAILURE: Failure to connect to the room, possibly due to network issues.
•
ROOM_CLOSED: The room was closed because all participants left.
To investigate further, you can listen for the disconnection event and check the reason provided. If you need help debugging this issue, feel free to share more details about your setup or any error messages you are encountering.
Sources:
Connecting to LiveKit | LiveKit Docs |
RoomEvent | LiveKit JS Client SDK - v2.8.1 |
DISCONNECTED