fix: avoid unsupported display media min constraint

This commit is contained in:
EtienneLescot
2026-05-05 10:50:20 +02:00
parent ef36da4a4f
commit 3d1d4a5ff0
+1 -2
View File
@@ -5,7 +5,6 @@ import { useScopedT } from "@/contexts/I18nContext";
import { requestCameraAccess } from "@/lib/requestCameraAccess";
const TARGET_FRAME_RATE = 60;
const MIN_FRAME_RATE = 30;
const TARGET_WIDTH = 3840;
const TARGET_HEIGHT = 2160;
const FOUR_K_PIXELS = TARGET_WIDTH * TARGET_HEIGHT;
@@ -585,7 +584,7 @@ export function useScreenRecorder(): UseScreenRecorderReturn {
cursor: "never",
width: { max: TARGET_WIDTH },
height: { max: TARGET_HEIGHT },
frameRate: { ideal: TARGET_FRAME_RATE, min: MIN_FRAME_RATE },
frameRate: { ideal: TARGET_FRAME_RATE },
} as MediaTrackConstraints,
audio: systemAudioEnabled,
} as DisplayMediaStreamOptions);