feat(calls): change noise suppression mid-call without rejoining
CI / Build & Quality Checks (push) Skipped
CI / Secret scan (gitleaks) (push) Skipped
CI / Playwright smoke (e2e) (push) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 2m5s
CI / Build & Quality Checks (pull_request) Successful in 3m1s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Playwright smoke (e2e) (pull_request) Successful in 17m2s

Changing Noise suppression (off / browser-native / ML), the ML model, the
gate or "stack browser NS" in Settings now applies to the call you're in.
useCallDenoise sends the fork's io.lotus.set_denoise whenever those
settings change; CallControl join-gates it like set_quality and re-sends
it after an EC reconnect (the remounted fork handler starts again from
the join URL). The "requires rejoining the call" note is replaced.

Bumps Element Call to 0.28.0-lotus.4, which adds io.lotus.set_denoise and
fixes mic re-captures silently keeping the old noiseSuppression (the mic
level meter's clone held the old track open), the meter following the
old device after a mic switch, and voiceIsolation staying on in off/ML
modes (element-call#66).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
This commit is contained in:
Lotus CI
2026-10-30 21:19:56 -04:00
co-authored by Claude Opus 5.5
parent 7d31b2b2f7
commit 504899aa14
8 changed files with 130 additions and 6 deletions
+23
View File
@@ -4,6 +4,7 @@ import { CallControlState } from './CallControlState';
import { ElementMediaStateDetail, ElementMediaStatePayload, ElementWidgetActions } from './types';
import { canDelegateCapability } from './utils';
import { CallErrorState, parseCallError } from './callError';
import type { LotusDenoisePayload } from '../../utils/callDenoise';
export enum CallControlEvent {
StateUpdate = 'state_update',
@@ -106,6 +107,11 @@ export class CallControl extends EventEmitter implements CallControlState {
// pre-join send pends to a 10s widget timeout, mirroring the deafen gate).
private lastQuality: LotusQualityPayload | null = null;
// Last noise-suppression choice (io.lotus.set_denoise), held like
// lastQuality: sent once joined and re-sent after an EC reconnect, whose
// remounted handler starts again from the settings in the join URL.
private lastDenoise: LotusDenoisePayload | null = null;
// C-M5: set true by CallControls while a push-to-talk key is held. A PTT hold
// unmutes the mic transiently, and onMediaState() must NOT treat that as a
// user-initiated unmute that auto-undeafens the user.
@@ -191,6 +197,7 @@ export class CallControl extends EventEmitter implements CallControlState {
this.joined = true;
this.sendDeafenState();
this.sendQuality();
this.sendDenoise();
this.sendHotkeyCodes();
this.sendFrameScreenshareAllowed();
}
@@ -204,6 +211,7 @@ export class CallControl extends EventEmitter implements CallControlState {
public resendForkState(): void {
this.sendDeafenState();
this.sendQuality();
this.sendDenoise();
if (this._audioOutputId !== undefined) this.sendAudioOutput(this._audioOutputId);
// [Gitea #17] The pin lives fork-side and is dropped on a handler remount.
if (this._focusedUserId !== null) this.sendFocus(this._focusedUserId, this._focusedMediaId);
@@ -762,6 +770,21 @@ export class CallControl extends EventEmitter implements CallControlState {
this.call.transport.send('io.lotus.set_quality', this.lastQuality).catch(() => undefined);
}
/**
* Switch noise suppression on the live mic (the fork's `io.lotus.set_denoise`):
* browser-native on/off and/or the ML model, without rejoining. Join-gated
* like setQuality().
*/
public setDenoise(payload: LotusDenoisePayload): void {
this.lastDenoise = payload;
this.sendDenoise();
}
private sendDenoise(): void {
if (!this.joined || !this.lastDenoise) return;
this.call.transport.send('io.lotus.set_denoise', this.lastDenoise).catch(() => undefined);
}
public dispose() {
// [Gitea #56] Don't let a manual focus pin outlive the call.
this.clearFocusParticipant();