subscriber: screen-share audio is forwarded into Discord voice (doubling / feedback loop) #142
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nether/nether-voicebridge#142
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
When a Matrix participant in a bridged call shares their screen with audio (Element Call "Share screen" on a tab/window with audio), the bridge subscribes to the resulting screen-share audio track and plays it into the Discord voice channel through that participant's puppet, exactly like a microphone.
Observed on prod 2026-10-01 (Light Gaming):
remote participant published a track ... kind=Audio→playback consumer startedfor the sharing participant → the shared audio was heard in Discord, doubled with its original source, and in one configuration fed back into itself (very loud echo for everyone in the channel until the share was stopped).Expected
Screen-share audio must never be forwarded into Discord voice. Discord has no counterpart for a screen share (bots cannot stream, and Discord users watching a Go Live already hear it natively), so forwarding it only produces doubled audio or a feedback loop. Screen-share video is already dropped by the playback consumer (
RemoteTrack::Videoearly return); audio needs the same treatment, keyed on the track source, not the kind.Fix
In
matrix-rtc/src/rtc/session.rs:TrackPublished/TrackSubscribed: ifpublication.source()isTrackSource::ScreenshareorTrackSource::ScreenshareAudio, log at info,set_subscribed(false), and skip the consumer + #73 heal-gate bookkeeping.Related: a Matrix-side counterpart to #141 (excluded MXIDs that never get a puppet) would also stop a share-only participant from occupying a Discord puppet slot at all.
Fixed in
7e04c78, shipped in v0.3.12, live-verified on prod 2026-10-01 18:23 UTC (Light Gaming):remote participant published a track ... kind=Audio source=ScreenshareAudio→screen-share track — not bridged, unsubscribing (#142)→ unsubscribe, and the same for theScreensharevideo publication; no playback consumer was started for either.Not covered here (expected): the participant's muted microphone track is still bridged, so a silent puppet still occupies a slot — that is the Matrix-side counterpart of #141.