-
Notifications
You must be signed in to change notification settings - Fork 213
Description
Description
When a room has a single host who disconnects and then rejoins without any tracks published (camera OFF, microphone OFF, share OFF), the ParticipantConnectedEvent is not emitted to other participants (viewers). This only occurs when there is one host in the room.
Expected Behavior:
- ParticipantConnectedEvent should fire whenever a remote participant joins the room, regardless
of whether they have tracks published.
Actual Behavior:
- ParticipantConnectedEvent is not emitted when a single host rejoins without camera/microphone
- The only event received is RoomMetadataChangedEvent
- Even after RoomMetadataChangedEvent, checking room.remoteParticipants does not include the
host - Once the host enables camera or microphone, ParticipantConnectedEvent finally fires
Steps to Reproduce
- Create a room with one host and one viewer
- Host joins with camera and microphone enabled → ParticipantConnectedEvent fires ✅
- Host disconnects → ParticipantDisconnectedEvent fires ✅
- Host rejoins the room with camera OFF and microphone OFF
- Viewer receives RoomMetadataChangedEvent but NO ParticipantConnectedEvent ❌
- Host enables camera → NOW ParticipantConnectedEvent fires
Logs
// Host is in room (before leaving)
RoomMetadataChangedEvent
// remoteParticipants check: hosts: 1, total: 2
// Host disconnects
ParticipantDisconnectedEvent
// Host rejoins WITHOUT camera/mic - NO ParticipantConnectedEvent
RoomMetadataChangedEvent
// remoteParticipants check: hosts: 0, total: 1 ← host not in list!
// Host enables camera - NOW event fires
ParticipantConnectedEvent
Environment
- SDK: livekit_client (Flutter) - v2.6.2
- Platform: Android (also likely affects iOS)
- Flutter version: 3.38.7
Impact
Viewers cannot detect when a host joins the room if the host has camera and microphone disabled.
This breaks UX for scenarios where hosts may want to join silently before enabling their media.
Workaround Attempted
We tried checking room.remoteParticipants on RoomMetadataChangedEvent, but the participant is
not in the list at that point due to a timing gap.