Skip to content

fix(audio): resolve a WASM-processed track to its real input device - #25790

Merged
prlanzarin merged 1 commit into
bigbluebutton:v4.0.x-developfrom
prlanzarin:u40d/fix/lk-wasm-unmute-25769
Sep 11, 2026
Merged

prlanzarin merged 1 commit into
bigbluebutton:v4.0.x-developfrom
prlanzarin:u40d/fix/lk-wasm-unmute-25769

Conversation

@prlanzarin

Copy link
Copy Markdown
Member

What does this PR do?

fix(audio): resolve a WASM-processed track to its real input device

  • The registry mapping a WASM-processed track back to the device it was
    captured from is keyed on the synthetic WebAudio-* device ID Chromium
    invents for MediaStreamAudioDestinationNode tracks. Firefox reports an
    empty getSettings() for those, so nothing is registered and the processed
    stream resolves to no device at all. Unmuting then matches none of the
    local publications: inside the unpublish-after-mute window the track is
    still published, so the republish fallback is skipped too and the unmute
    is a no-op - and it cancels the pending unpublish, so the microphone
    stays muted until audio is rejoined.
  • Key the registry on the processed track IDs as well, which every browser
    exposes, and resolve a track through either key. The synthetic ID stays
    registered where the browser provides one, so nothing changes for
    Chromium.

Closes Issue(s)

Closes #25769

How to test

  • Enable audioWasmProcessing + BBBA in settings.yml
  • Enter a meeting with Firefox (F1) and a second session with any browser (A2)
  • F1: Unmute
  • F1: speak, verify heard by A2
  • F1: Switch filter to Advanced (BBBA)
  • F1: Mute, than within 5 seconds, unmute
  • F1: speak, verify heard by A2 again

The registry mapping a WASM-processed track back to the device it was
captured from is keyed on the synthetic WebAudio-* device ID Chromium
invents for MediaStreamAudioDestinationNode tracks. Firefox reports an
empty getSettings() for those, so nothing is registered and the processed
stream resolves to no device at all. Unmuting then matches none of the
local publications: inside the unpublish-after-mute window the track is
still published, so the republish fallback is skipped too and the unmute
is a no-op - and it cancels the pending unpublish, so the microphone
stays muted until audio is rejoined.

Key the registry on the processed track IDs as well, which every browser
exposes, and resolve a track through either key. The synthetic ID stays
registered where the browser provides one, so nothing changes for
Chromium.
@prlanzarin prlanzarin added this to the Release 4.0 milestone Sep 11, 2026
@prlanzarin
prlanzarin marked this pull request as ready for review September 11, 2026 00:01
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2f4a9934-b4bc-4e55-8142-266494cc89b1

📥 Commits

Reviewing files that changed from the base of the PR and between 1db5edf and 470f205.

📒 Files selected for processing (2)
  • bigbluebutton-html5/imports/api/audio/client/bridge/service.js
  • bigbluebutton-html5/imports/utils/media-stream-utils.js

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


Walkthrough

The WASM audio setup now passes the processed stream to registerWasmDeviceId. The media stream utility extracts audio tracks and maps both synthetic device IDs and track IDs to the real device ID. Audio device resolution uses the track mapping and falls back to the track's own device ID.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Suggested reviewers: arthurk12

Merge Risk: ⚪ Minimal · up to 470f2

The updated mapping preserves device resolution for processed audio tracks, including Firefox tracks without settings-derived device IDs. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: resolving a WASM-processed audio track to its real input device.
Description check ✅ Passed The description explains the Firefox failure mode, the track-ID mapping fix, Chromium compatibility, the linked issue, and test steps.
Linked Issues check ✅ Passed The changes address issue #25769 by mapping processed audio track IDs and resolving them to the real input device, which supports microphone restoration during Firefox mute and unmute flows.
Out of Scope Changes check ✅ Passed The changes are limited to WASM audio device mapping and processed-track resolution. They directly support the linked issue and contain no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

✅ Automated tests have passed!

@prlanzarin
prlanzarin merged commit ebbdb78 into bigbluebutton:v4.0.x-develop Sep 11, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[4.0] Mute participants except presenter dropped my microphone channel

1 participant