From 6d46d7a3ed273fce29c92a5d7ed6dd7dbbcf15a5 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:18:59 -0600 Subject: [PATCH] always show stream info when restreamed --- .../settings/CameraStreamingDialog.tsx | 2 +- web/src/views/live/LiveCameraView.tsx | 275 +++++++++++------- 2 files changed, 172 insertions(+), 105 deletions(-) diff --git a/web/src/components/settings/CameraStreamingDialog.tsx b/web/src/components/settings/CameraStreamingDialog.tsx index 2bfc01d91..990c6850c 100644 --- a/web/src/components/settings/CameraStreamingDialog.tsx +++ b/web/src/components/settings/CameraStreamingDialog.tsx @@ -211,7 +211,7 @@ export function CameraStreamingDialog({ Info - + Audio must be output from your camera and configured in go2rtc for this stream.
diff --git a/web/src/views/live/LiveCameraView.tsx b/web/src/views/live/LiveCameraView.tsx index 2a8ba3469..9db672e52 100644 --- a/web/src/views/live/LiveCameraView.tsx +++ b/web/src/views/live/LiveCameraView.tsx @@ -1047,93 +1047,82 @@ function FrigateCameraFeatures({
- {Object.values(camera.live.streams).length > 1 && ( -
- - { + setStreamName?.(value); + }} + > + + {Object.keys(camera.live.streams).find( + (key) => camera.live.streams[key] === streamName, )} - - - + - {preferredLiveMode != "jsmpeg" && isRestreamed && ( -
- {supportsAudioOutput ? ( - <> - -
Audio is available for this stream
- - ) : ( - <> - -
Audio is unavailable for this stream
- - -
- - Info -
-
- - Audio must be output from your camera and - configured in go2rtc for this stream. -
- - Read the documentation{" "} - - -
-
-
- - )} -
- )} - {preferredLiveMode != "jsmpeg" && - isRestreamed && - supportsAudioOutput && ( + + + {Object.entries(camera.live.streams).map( + ([stream, name]) => ( + + {stream} + + ), + )} + + + + + {preferredLiveMode != "jsmpeg" && isRestreamed && (
- {supports2WayTalk ? ( + {supportsAudioOutput ? ( <> -
Two-way talk is available for this stream
+
Audio is available for this stream
) : ( <> -
- Two-way talk is unavailable for this stream -
+
Audio is unavailable for this stream
@@ -1142,11 +1131,11 @@ function FrigateCameraFeatures({
- Your device must suppport the feature and WebRTC - must be configured for two-way talk. + Audio must be output from your camera and + configured in go2rtc for this stream.
)} + {preferredLiveMode != "jsmpeg" && + isRestreamed && + supportsAudioOutput && ( +
+ {supports2WayTalk ? ( + <> + +
+ Two-way talk is available for this stream +
+ + ) : ( + <> + +
+ Two-way talk is unavailable for this stream +
+ + +
+ + Info +
+
+ + Your device must suppport the feature and + WebRTC must be configured for two-way talk. +
+ + Read the documentation{" "} + + +
+
+
+ + )} +
+ )} - {preferredLiveMode == "jsmpeg" && isRestreamed && ( -
-
- + {preferredLiveMode == "jsmpeg" && isRestreamed && ( +
+
+ -

- Live view is in low-bandwidth mode due to buffering or - stream errors. -

+

+ Live view is in low-bandwidth mode due to buffering + or stream errors. +

+
+
- -
- )} -
- )} + )} +
+ )} {isRestreamed && (
@@ -1309,7 +1344,39 @@ function FrigateCameraFeatures({ )}
- {Object.values(camera.live.streams).length > 1 && ( + {!isRestreamed && ( +
+ +
+ +
Restreaming is not enabled for this camera.
+ + +
+ + Info +
+
+ + Set up go2rtc for additional live view options and audio for + this camera. +
+ + Read the documentation{" "} + + +
+
+
+
+
+ )} + {isRestreamed && Object.values(camera.live.streams).length > 0 && (
Stream