From bc0e5ed4323d8a8358875231c9ff32858f1ac63e Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Mon, 14 Sep 2026 21:10:11 -0400 Subject: [PATCH] =?UTF-8?q?fix(lotus):=20capture=20the=20microphone=20mono?= =?UTF-8?q?=20=E2=80=94=20stereo=20interfaces=20published=20left-only=20on?= =?UTF-8?q?=20Firefox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit audioCaptureDefaults set no channelCount, so Firefox captured a 2-channel audio interface (Scarlett Solo, one XLR mic on input 1) as stereo and, with browser audio processing off (the ML denoise tier), published it as is: peers heard the speaker in the left ear only. Chrome downmixes such captures itself, which is why it only showed on Firefox. Request channelCount: 1 for mic capture; screenshare audio is captured separately and is unaffected. Tested. Bumps to 0.25.0-lotus.3. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA --- embedded/web/package.json | 2 +- src/lotus/lotusAudioConstraints.test.ts | 10 ++++++++++ .../CallViewModel/remoteMembers/ConnectionFactory.ts | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/embedded/web/package.json b/embedded/web/package.json index e7dfcc2e..b0e03a9c 100644 --- a/embedded/web/package.json +++ b/embedded/web/package.json @@ -1,6 +1,6 @@ { "name": "@lotusguild/element-call-embedded", - "version": "0.25.0-lotus.2", + "version": "0.25.0-lotus.3", "files": [ "README.md", "LICENSE-AGPL-3.0", diff --git a/src/lotus/lotusAudioConstraints.test.ts b/src/lotus/lotusAudioConstraints.test.ts index 90d66591..effac8d0 100644 --- a/src/lotus/lotusAudioConstraints.test.ts +++ b/src/lotus/lotusAudioConstraints.test.ts @@ -88,6 +88,16 @@ afterEach(() => { }); describe("[lotus] audio-capture URL param overrides", () => { + test("mic capture is always requested mono (stereo interfaces on Firefox published L-only)", () => { + getUrlParams.mockReturnValue({ + echoCancellation: false, + noiseSuppression: false, + autoGainControl: false, + }); + createRoom(); + expect(capturedAudioDefaults()).toMatchObject({ channelCount: 1 }); + }); + test("with params defaulted to true, the Settings govern (upstream behaviour)", () => { getUrlParams.mockReturnValue({ echoCancellation: true, diff --git a/src/state/CallViewModel/remoteMembers/ConnectionFactory.ts b/src/state/CallViewModel/remoteMembers/ConnectionFactory.ts index c8aae360..b4c083a4 100644 --- a/src/state/CallViewModel/remoteMembers/ConnectionFactory.ts +++ b/src/state/CallViewModel/remoteMembers/ConnectionFactory.ts @@ -183,6 +183,13 @@ function generateRoomOption({ audioCaptureDefaults: { ...liveKitOptions.audioCaptureDefaults, deviceId: devices.audioInput.selected$.value?.id, + // [lotus] Voice is mono. Without this, Firefox captures a 2-channel + // audio interface (e.g. a Scarlett Solo with one XLR mic on input 1) as + // stereo and, with browser audio processing off, publishes it that way — + // peers hear the speaker in the left ear only. Chrome downmixes such + // captures itself, which is why it only showed on Firefox. Screenshare + // audio is captured separately and is unaffected. + channelCount: 1, echoCancellation: echoCancellationSetting.getValue() && getUrlParams().echoCancellation !== false,