feat(session): subscribe only to the slot's own camera and mic
Build / Linux (ubuntu-24.04) (push) Successful in 1m8s
Build / macOS (macos-latest) (push) Successful in 1m9s
Build / macOS (macos-latest) (pull_request) Successful in 44s
Build / Windows (windows-latest) (push) Successful in 7m0s
Build / Windows (windows-latest) (pull_request) Successful in 4m14s
Build / Linux (ubuntu-24.04) (pull_request) Failing after 42m30s
Build / Linux (ubuntu-24.04) (push) Successful in 1m8s
Build / macOS (macos-latest) (push) Successful in 1m9s
Build / macOS (macos-latest) (pull_request) Successful in 44s
Build / Windows (windows-latest) (push) Successful in 7m0s
Build / Windows (windows-latest) (pull_request) Successful in 4m14s
Build / Linux (ubuntu-24.04) (pull_request) Failing after 42m30s
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>
This commit is contained in:
@@ -44,11 +44,9 @@ struct SessionConfig {
|
||||
|
||||
bool subscribe_audio = true;
|
||||
|
||||
/// False for an audio-only source (the soundboard, say): the wanted
|
||||
/// video track is never attached (no AttachVideo command posted), and
|
||||
/// its publication is explicitly disabled server-side (RemoteTrack-
|
||||
/// Publication::setEnabled(false)) so the SFU stops sending it at all --
|
||||
/// not just "decoded and discarded here", genuinely not delivered.
|
||||
/// False for an audio-only source (the soundboard, say): the slot's
|
||||
/// video track is never subscribed to (see shouldSubscribe), so the SFU
|
||||
/// never sends it at all -- not just "decoded and discarded here".
|
||||
bool subscribe_video = true;
|
||||
|
||||
/// How long connect() waits for the room to come up before giving up.
|
||||
|
||||
Reference in New Issue
Block a user