From d52e37d72dddc6bc6bc14ffc35b381925a617c27 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:16:07 -0500 Subject: [PATCH] use const --- web/src/utils/cameraUtil.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/utils/cameraUtil.ts b/web/src/utils/cameraUtil.ts index 11c4988da..07295d73c 100644 --- a/web/src/utils/cameraUtil.ts +++ b/web/src/utils/cameraUtil.ts @@ -125,6 +125,10 @@ export type CameraAudioFeatures = { * @param streamHeight - Native stream height in pixels * @returns Detect dimensions with even values, or null if inputs are invalid */ + +// Target size for the smaller dimension (width or height) for detect streams +export const DETECT_TARGET_PX = 720; + export function calculateDetectDimensions( streamWidth: number, streamHeight: number, @@ -139,7 +143,7 @@ export function calculateDetectDimensions( } const smallerDim = Math.min(streamWidth, streamHeight); - const target = Math.min(720, smallerDim); + const target = Math.min(DETECT_TARGET_PX, smallerDim); const scale = target / smallerDim; let width = Math.round(streamWidth * scale);