fix: VP9 default for both modes, clean up codec pill UI
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.
This commit is contained in:
@@ -146,7 +146,7 @@ export const useVoiceStore = create<VoiceState>()(
|
||||
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<VoiceState>()(
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user