From ad3676f645f4d4905e0632fa42dbacd2ca71fce1 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 12 Oct 2025 18:16:56 -0500 Subject: [PATCH] add stream details to overlay like stats in liveplayer --- .../components/settings/Step1NameCamera.tsx | 105 ++++++++++-------- 1 file changed, 57 insertions(+), 48 deletions(-) diff --git a/web/src/components/settings/Step1NameCamera.tsx b/web/src/components/settings/Step1NameCamera.tsx index 01f3b70ad..ceaaaf406 100644 --- a/web/src/components/settings/Step1NameCamera.tsx +++ b/web/src/components/settings/Step1NameCamera.tsx @@ -510,61 +510,29 @@ export default function Step1NameCamera({
- {testResult.snapshot && ( -
+ {testResult.snapshot ? ( +
Camera snapshot +
+
+ +
+
+ ) : ( + + + {t("cameraWizard.step1.streamDetails")} + + + + + )} - - - - {t("cameraWizard.step1.streamDetails")} - - - {testResult.resolution && ( -
- - {t("cameraWizard.testResultLabels.resolution")}: - {" "} - - {testResult.resolution} - -
- )} - {testResult.videoCodec && ( -
- - {t("cameraWizard.testResultLabels.video")}: - {" "} - - {testResult.videoCodec} - -
- )} - {testResult.audioCodec && ( -
- - {t("cameraWizard.testResultLabels.audio")}: - {" "} - - {testResult.audioCodec} - -
- )} - {testResult.fps && ( -
- - {t("cameraWizard.testResultLabels.fps")}: - {" "} - {testResult.fps} -
- )} -
-
)} @@ -604,3 +572,44 @@ export default function Step1NameCamera({ ); } + +function StreamDetails({ testResult }: { testResult: TestResult }) { + const { t } = useTranslation(["views/settings"]); + + return ( + <> + {testResult.resolution && ( +
+ + {t("cameraWizard.testResultLabels.resolution")}: + {" "} + {testResult.resolution} +
+ )} + {testResult.fps && ( +
+ + {t("cameraWizard.testResultLabels.fps")}: + {" "} + {testResult.fps} +
+ )} + {testResult.videoCodec && ( +
+ + {t("cameraWizard.testResultLabels.video")}: + {" "} + {testResult.videoCodec} +
+ )} + {testResult.audioCodec && ( +
+ + {t("cameraWizard.testResultLabels.audio")}: + {" "} + {testResult.audioCodec} +
+ )} + + ); +}