From cd8adcaaf4ec13aa0415d7c3d30ae76ed3f1a69a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Mon, 29 Sep 2025 13:20:04 -0600 Subject: [PATCH] integrate debug view --- web/src/views/live/LiveCameraView.tsx | 139 ++++++++++++++++---------- 1 file changed, 86 insertions(+), 53 deletions(-) diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index fb729e389..bd5d4ea34 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -110,6 +110,7 @@ import { useIsAdmin } from "@/hooks/use-is-admin"; import { Trans, useTranslation } from "react-i18next"; import { useDocDomain } from "@/hooks/use-doc-domain"; import PtzControlPanel from "@/components/overlay/PtzControlPanel"; +import ObjectSettingsView from "../settings/ObjectSettingsView"; type LiveCameraViewProps = { config?: FrigateConfig; @@ -271,6 +272,7 @@ export default function LiveCameraView({ ); const [showStats, setShowStats] = useState(false); + const [debug, setDebug] = useState(false); const [fullResolution, setFullResolution] = useState({ width: 0, @@ -421,7 +423,11 @@ export default function LiveCameraView({ ); return ( - +
-
+ {!debug ? ( +
+ +
+ +
+
+ {camera?.audio?.enabled_in_config && + audioTranscriptionState == "ON" && + transcription != null && ( +
+ {transcription} +
+ )} +
+ ) : ( -
- -
+
- {camera?.audio?.enabled_in_config && - audioTranscriptionState == "ON" && - transcription != null && ( -
- {transcription} -
- )} -
+ )} {camera.onvif.host != "" && (
@@ -719,6 +743,8 @@ type FrigateCameraFeaturesProps = { supportsAudioOutput: boolean; supports2WayTalk: boolean; cameraEnabled: boolean; + debug: boolean; + setDebug: (debug: boolean) => void; }; function FrigateCameraFeatures({ camera, @@ -739,6 +765,8 @@ function FrigateCameraFeatures({ supportsAudioOutput, supports2WayTalk, cameraEnabled, + debug, + setDebug, }: FrigateCameraFeaturesProps) { const { t } = useTranslation(["views/live", "components/dialog"]); const { getLocaleDocUrl } = useDocDomain(); @@ -1228,17 +1256,22 @@ function FrigateCameraFeatures({ })}

-
- navigate(`/settings?page=debug&camera=${camera.name}`) - } - > -
- {t("streaming.debugView", { - ns: "components/dialog", - })} - +
+
+ + setDebug(checked)} + />