From 42f11c71e73af80cd17e844ac66659c205ef4b67 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:56:40 -0600 Subject: [PATCH] hide resolution if both width and height are zero --- .../settings/wizard/Step2ProbeOrSnapshot.tsx | 11 ++++++++--- .../components/settings/wizard/Step3StreamConfig.tsx | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx b/web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx index 364c97202..728cb6634 100644 --- a/web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx +++ b/web/src/components/settings/wizard/Step2ProbeOrSnapshot.tsx @@ -111,9 +111,14 @@ export default function Step2ProbeOrSnapshot({ s.codec_name?.includes("pcm_alaw"), ); - const resolution = videoStream - ? `${videoStream.width}x${videoStream.height}` - : undefined; + let resolution: string | undefined = undefined; + if (videoStream) { + const width = Number(videoStream.width || 0); + const height = Number(videoStream.height || 0); + if (width > 0 && height > 0) { + resolution = `${width}x${height}`; + } + } const fps = videoStream?.avg_frame_rate ? parseFloat(videoStream.avg_frame_rate.split("/")[0]) / diff --git a/web/src/components/settings/wizard/Step3StreamConfig.tsx b/web/src/components/settings/wizard/Step3StreamConfig.tsx index b46e1f723..1ade7a037 100644 --- a/web/src/components/settings/wizard/Step3StreamConfig.tsx +++ b/web/src/components/settings/wizard/Step3StreamConfig.tsx @@ -240,9 +240,14 @@ export default function Step3StreamConfig({ s.codec_name?.includes("pcm_alaw"), ); - const resolution = videoStream - ? `${videoStream.width}x${videoStream.height}` - : undefined; + let resolution: string | undefined = undefined; + if (videoStream) { + const width = Number(videoStream.width || 0); + const height = Number(videoStream.height || 0); + if (width > 0 && height > 0) { + resolution = `${width}x${height}`; + } + } const fps = videoStream?.avg_frame_rate ? parseFloat(videoStream.avg_frame_rate.split("/")[0]) /