diff --git a/apps/desktop/src/context/CallContext.tsx b/apps/desktop/src/context/CallContext.tsx index ff853f3..9185d12 100644 --- a/apps/desktop/src/context/CallContext.tsx +++ b/apps/desktop/src/context/CallContext.tsx @@ -1310,9 +1310,17 @@ export function CallProvider({ children }: { children: ReactNode }) { stream.getTracks().forEach((t) => t.stop()); throw new Error('no video track from chromeMediaSource'); } + // H.264 lets Chromium's hardware encoder take over on Windows + // (Intel QuickSync / NVENC / AMD VCE) — VP9 is software-only in + // Chromium's WebRTC path and collapses under the L3T3_KEY + // scalability mode we set globally for camera. `contentHint` is + // what setScreenShareEnabled sets internally; pushing it by hand + // here tells the encoder to weight sharpness over smoothness, + // which is right for UI/text-heavy screen content. + videoMst.contentHint = 'detail'; const videoPub = await lp.publishTrack(videoMst, { source: LkTrack.Source.ScreenShare, - videoCodec: 'vp9', + videoCodec: 'h264', }); const audioRes = await startWasapiAudio(LkTrack); videoMst.addEventListener('ended', () => { @@ -1358,9 +1366,10 @@ export function CallProvider({ children }: { children: ReactNode }) { nativeCaptureRef.current = null; throw new NativeCaptureUnavailable('canvas stream produced no video track'); } + videoMst.contentHint = 'detail'; const videoPub = await lp.publishTrack(videoMst, { source: LkTrack.Source.ScreenShare, - videoCodec: 'vp9', + videoCodec: 'h264', }); const audioRes = await startWasapiAudio(LkTrack); videoMst.addEventListener('ended', () => { diff --git a/apps/desktop/src/lib/screenShareSettings.ts b/apps/desktop/src/lib/screenShareSettings.ts index 6fb3cfe..b7a9515 100644 --- a/apps/desktop/src/lib/screenShareSettings.ts +++ b/apps/desktop/src/lib/screenShareSettings.ts @@ -46,7 +46,7 @@ export interface PresetParams { } const PRESET_PARAMS: Record = { - auto: { dims: null, framerate: 60, bitrateKbps: 8000, label: 'Auto (Original)' }, + auto: { dims: null, framerate: 30, bitrateKbps: 8000, label: 'Auto (Original)' }, '720p30': { dims: { width: 1280, height: 720 }, framerate: 30,