feat: add manual codec selection (VP9/H.264) to stream settings

VP9 is default — better quality per bit with H.264 SIMULCAST backup
for Safari. H.264 option available for zero-CPU hardware encoding.
Codec choice is independent of gaming/text mode, which still controls
contentHint and degradationPreference.
This commit is contained in:
Jannis Braun
2026-03-23 22:44:31 +01:00
parent e7a18bd28c
commit 894ce68194
3 changed files with 38 additions and 11 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ export interface ScreenShareConfig {
height: number | 'native';
fps: number;
mode: 'gaming' | 'text';
codec: 'vp9' | 'h264';
customBitrateKbps: number | null;
shareAudio: boolean;
}
@@ -145,7 +146,7 @@ export const useVoiceStore = create<VoiceState>()(
inputDeviceId: 'default',
outputDeviceId: 'default',
focusedParticipantId: null,
screenShareConfig: { height: 720, fps: 60, mode: 'gaming', 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) => {