From 65a1fc1402cb3b247ea3f822cc9f9ac17deb13c6 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Tue, 24 Mar 2026 00:59:04 +0100 Subject: [PATCH] fix: VP9 default for both modes, clean up codec pill UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VP9 empirically outperforms H.264 in gaming (Chrome may not use NVENC for screen share H.264). Codec pills now match other pill styles — simple labels, no description text. Mode change no longer auto-switches codec; user's codec choice is independent. --- .../components/voice/ScreenShareSettingsPopover.tsx | 13 +++++-------- packages/web/src/stores/voiceStore.ts | 13 ++++--------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx b/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx index 9b8d7764..25443eb5 100644 --- a/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx +++ b/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx @@ -20,9 +20,9 @@ const MODES: { value: ScreenShareConfig['mode']; label: string }[] = [ { value: 'text', label: 'Text' }, ]; -const CODECS: { value: ScreenShareConfig['codec']; label: string; desc: string }[] = [ - { value: 'vp9', label: 'VP9', desc: 'Less bandwidth, more CPU' }, - { value: 'h264', label: 'H.264', desc: 'Less CPU, more bandwidth' }, +const CODECS: { value: ScreenShareConfig['codec']; label: string }[] = [ + { value: 'vp9', label: 'VP9' }, + { value: 'h264', label: 'H.264' }, ]; function formatBitrate(bps: number): string { @@ -193,12 +193,9 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS ))} diff --git a/packages/web/src/stores/voiceStore.ts b/packages/web/src/stores/voiceStore.ts index a4471d93..449de192 100644 --- a/packages/web/src/stores/voiceStore.ts +++ b/packages/web/src/stores/voiceStore.ts @@ -146,7 +146,7 @@ export const useVoiceStore = create()( inputDeviceId: 'default', outputDeviceId: 'default', focusedParticipantId: null, - screenShareConfig: { height: 720, fps: 60, mode: 'gaming', codec: 'h264', customBitrateKbps: null, shareAudio: !isElectron() }, + screenShareConfig: { height: 720, fps: 60, mode: 'gaming', codec: 'vp9', customBitrateKbps: null, shareAudio: !isElectron() }, participantVolumes: new Map(), setParticipantVolume: (userId, volume) => { set((state) => { @@ -326,14 +326,9 @@ export const useVoiceStore = create()( toggleScreenShare: () => set((state) => ({ isScreenSharing: !state.isScreenSharing })), setFocusedParticipant: (id) => set({ focusedParticipantId: id }), - setScreenShareConfig: (config) => set((state) => { - const merged = { ...state.screenShareConfig, ...config }; - // When mode changes (without an explicit codec override), auto-set the smart default - if (config.mode && !config.codec) { - merged.codec = config.mode === 'gaming' ? 'h264' : 'vp9'; - } - return { screenShareConfig: merged }; - }), + setScreenShareConfig: (config) => set((state) => ({ + screenShareConfig: { ...state.screenShareConfig, ...config }, + })), noiseSuppression: true, echoCancellation: true, autoGainControl: true,