refactor(call): move noise-suppression toggle out of the call bar

Default flipped to off so voice doesn't get coloured by browser NS on
first run. Users turn it on explicitly under Settings → Sprache, where
the toggle already lived before the in-call button shipped.

The in-call SparklesIcon button and all the associated wiring
(onToggleNoiseSuppression, noiseSuppression prop, local subscription
in InCallPanel) is removed. The hot-swap UX is preserved: a new
subscribeAudioSettings watcher in CallContext detects noiseSuppression
flips during an active call and re-runs setupMicPipeline so the change
takes effect without rejoining.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
byGalax
2026-04-22 20:14:57 +02:00
parent eb8f702576
commit 02ca3e3581
4 changed files with 21 additions and 45 deletions
@@ -9,7 +9,6 @@ import {
MonitorStopIcon,
MusicIcon,
PhoneOffIcon,
SparklesIcon,
UsersIcon,
VideoIcon,
} from './icons';
@@ -19,7 +18,6 @@ interface Props {
sharing: boolean;
video: boolean;
deafened: boolean;
noiseSuppression?: boolean;
onToggleMute: () => void;
onToggleShare: () => void;
/** Right-click on the share button opens the quality picker dialog while
@@ -28,7 +26,6 @@ interface Props {
onShareContextMenu?: (e: React.MouseEvent) => void;
onToggleVideo?: () => void;
onToggleDeafen: () => void;
onToggleNoiseSuppression?: () => void;
onHangup: () => void;
onOpenParticipants?: () => void;
/** Toggle the in-call soundboard popover. Active = panel currently open. */
@@ -48,13 +45,11 @@ export function CallControls({
sharing,
video,
deafened,
noiseSuppression,
onToggleMute,
onToggleShare,
onShareContextMenu,
onToggleVideo,
onToggleDeafen,
onToggleNoiseSuppression,
onHangup,
onOpenParticipants,
onToggleSoundboard,
@@ -134,26 +129,6 @@ export function CallControls({
<MonitorShareIcon className="h-5 w-5" />
)}
</CallButton>
{onToggleNoiseSuppression && (
<CallButton
label={
noiseSuppression
? t('app:call.ns_off', {
defaultValue: 'Rauschunterdrückung aus',
})
: t('app:call.ns_on', {
defaultValue: 'Rauschunterdrückung an',
})
}
active={noiseSuppression ?? false}
activeTone="accent"
onClick={onToggleNoiseSuppression}
glass={glass}
className={btnSize}
>
<SparklesIcon className="h-5 w-5" />
</CallButton>
)}
{onToggleSoundboard && (
<CallButton
label={t('app:soundboard.toggle', { defaultValue: 'Soundboard' })}