Every plugin source connected with auto_subscribe on, so each pulled every camera in the room and discarded all but one. In the 2026-10-04 old-gods-of-appalachia show (8 sources, 7 cameras), each source carried 4–7 Mbps and all 8 hit congestion in the same instant: they share the director's one downlink, so the SFU starved the cameras actually on screen.
What
auto_subscribe = false; the session calls setSubscribed(true) on exactly the slot's camera + mic: at connect, on onTrackPublished, and after reconnect.
SDK 1.10.1 delivers TrackPublishedEvent::publicationnull, so that handler re-sweeps the participant's publication map (subscribe-only, never re-attaches the live camera).
Any subscription not asked for is logged and handed back (setSubscribed(false)).
Audio-only sources never subscribe to video (replaces subscribe-then-setEnabled(false)).
Verified
Against a real livekit-server 1.13.6 (--dev):
New bystander-camera check fails before this change (3 unwanted subscriptions), passes after.
New full leave/rejoin-as-new-session step passes (the real-world "reload to unstick" case).
Full ctest green; integration test 4 consecutive runs, 49/49 each.
Not verified
In the OBS GUI / a live show. Needs the director to install the new DLL and a show's LiveKit logs compared for simultaneous channel congestion detected across obs:* participants.
## Why
Every plugin source connected with `auto_subscribe` on, so each pulled **every camera in the room** and discarded all but one. In the 2026-10-04 `old-gods-of-appalachia` show (8 sources, 7 cameras), each source carried 4–7 Mbps and all 8 hit congestion in the same instant: they share the director's one downlink, so the SFU starved the cameras actually on screen.
## What
- `auto_subscribe = false`; the session calls `setSubscribed(true)` on exactly the slot's camera + mic: at connect, on `onTrackPublished`, and after reconnect.
- SDK 1.10.1 delivers `TrackPublishedEvent::publication` **null**, so that handler re-sweeps the participant's publication map (subscribe-only, never re-attaches the live camera).
- Any subscription not asked for is logged and handed back (`setSubscribed(false)`).
- Audio-only sources never subscribe to video (replaces subscribe-then-`setEnabled(false)`).
## Verified
Against a real `livekit-server` 1.13.6 (`--dev`):
- New bystander-camera check **fails before** this change (3 unwanted subscriptions), passes after.
- New full leave/rejoin-as-new-session step passes (the real-world "reload to unstick" case).
- Full ctest green; integration test 4 consecutive runs, 49/49 each.
## Not verified
- In the OBS GUI / a live show. Needs the director to install the new DLL and a show's LiveKit logs compared for simultaneous `channel congestion detected` across `obs:*` participants.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Every plugin source connected with auto_subscribe on, so each one pulled
every camera in the room and discarded all but one. In the 2026-10-04
old-gods-of-appalachia show (8 sources, 7 cameras) each source carried
4-7 Mbps and all 8 hit congestion in the same instant: they share the
director's single downlink, so the SFU starved the cameras on screen.
The session now connects with auto_subscribe off and calls
setSubscribed(true) on exactly the wanted publications: at connect, on
onTrackPublished (re-sweeping the participant, since SDK 1.10.1 delivers
that event's publication null), and after a reconnect. Any subscription
it did not ask for is reported and handed back. Audio-only sources no
longer subscribe-then-disable video; they never subscribe to it.
The integration test gains a bystander camera that must never be
subscribed (fails with 3 unwanted subscriptions before this change) and
a full publisher leave/rejoin as a new participant session.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jknapp
merged commit dc5ffc9938 into main2026-10-05 01:33:34 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
Every plugin source connected with
auto_subscribeon, so each pulled every camera in the room and discarded all but one. In the 2026-10-04old-gods-of-appalachiashow (8 sources, 7 cameras), each source carried 4–7 Mbps and all 8 hit congestion in the same instant: they share the director's one downlink, so the SFU starved the cameras actually on screen.What
auto_subscribe = false; the session callssetSubscribed(true)on exactly the slot's camera + mic: at connect, ononTrackPublished, and after reconnect.TrackPublishedEvent::publicationnull, so that handler re-sweeps the participant's publication map (subscribe-only, never re-attaches the live camera).setSubscribed(false)).setEnabled(false)).Verified
Against a real
livekit-server1.13.6 (--dev):Not verified
channel congestion detectedacrossobs:*participants.🤖 Generated with Claude Code