diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx
index 52323a4ba..a57c697d4 100644
--- a/web/src/components/player/LivePlayer.tsx
+++ b/web/src/components/player/LivePlayer.tsx
@@ -46,7 +46,7 @@ export default function LivePlayer({
}: LivePlayerProps) {
// camera activity
- const { activeMotion, activeTracking, objects } =
+ const { activeMotion, activeTracking, objects, offline } =
useCameraActivity(cameraConfig);
const cameraActive = useMemo(
@@ -224,9 +224,16 @@ export default function LivePlayer({
/>
-
- {activeMotion && (
-
+
+ {!offline && activeMotion && (
+
+ )}
+ {offline && (
+
+ {cameraConfig.name.replaceAll("_", " ")}
+
)}
diff --git a/web/src/hooks/use-camera-activity.ts b/web/src/hooks/use-camera-activity.ts
index 82cda969a..582b0f2f1 100644
--- a/web/src/hooks/use-camera-activity.ts
+++ b/web/src/hooks/use-camera-activity.ts
@@ -1,5 +1,6 @@
import {
useFrigateEvents,
+ useFrigateStats,
useInitialCameraState,
useMotionActivity,
} from "@/api/ws";
@@ -10,11 +11,13 @@ import { useTimelineUtils } from "./use-timeline-utils";
import { ObjectType } from "@/types/ws";
import useDeepMemo from "./use-deep-memo";
import { isEqual } from "lodash";
+import useStats from "./use-stats";
type useCameraActivityReturn = {
activeTracking: boolean;
activeMotion: boolean;
objects: ObjectType[];
+ offline: boolean;
};
export function useCameraActivity(
@@ -116,12 +119,31 @@ export function useCameraActivity(
handleSetObjects(newObjects);
}, [camera, updatedEvent, objects, handleSetObjects]);
+ // determine if camera is offline
+
+ const { payload: frigateStats } = useFrigateStats();
+
+ const offline = useMemo(() => {
+ if (!frigateStats) {
+ return false;
+ }
+
+ const cameras = frigateStats["cameras"];
+
+ if (!cameras) {
+ return false;
+ }
+
+ return cameras[camera.name].camera_fps == 0;
+ }, [camera, frigateStats]);
+
return {
activeTracking: hasActiveObjects,
activeMotion: detectingMotion
? detectingMotion === "ON"
: initialCameraState?.motion === true,
objects,
+ offline,
};
}