diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index 7d4b85b02..c8bbea0df 100644 --- a/web/src/components/player/LivePlayer.tsx +++ b/web/src/components/player/LivePlayer.tsx @@ -1,5 +1,5 @@ import WebRtcPlayer from "./WebRTCPlayer"; -import { CameraConfig, FrigateConfig } from "@/types/frigateConfig"; +import { CameraConfig } from "@/types/frigateConfig"; import AutoUpdatingCameraImage from "../camera/AutoUpdatingCameraImage"; import ActivityIndicator from "../indicators/activity-indicator"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; @@ -20,7 +20,6 @@ import { cn } from "@/lib/utils"; import { TbExclamationCircle } from "react-icons/tb"; import { TooltipPortal } from "@radix-ui/react-tooltip"; import { baseUrl } from "@/api/baseUrl"; -import useSWR from "swr"; type LivePlayerProps = { cameraRef?: (ref: HTMLDivElement | null) => void; @@ -59,7 +58,6 @@ export default function LivePlayer({ onError, onResetLiveMode, }: LivePlayerProps) { - const { data: config } = useSWR("config"); const internalContainerRef = useRef(null); // camera activity @@ -150,14 +148,6 @@ export default function LivePlayer({ setLiveReady(true); }, []); - const isRestreamed = useMemo( - () => - cameraConfig && - config && - Object.keys(config.go2rtc.streams || {}).includes(cameraConfig.name), - [cameraConfig, config], - ); - if (!cameraConfig) { return ; } @@ -309,13 +299,17 @@ export default function LivePlayer({ /> - {offline && !showStillWithoutActivity && !isRestreamed && ( -
-

- {capitalizeFirstLetter(cameraConfig.name)} is offline -

- -

No frames have been received, check error logs

+ {!offline && !showStillWithoutActivity && ( +
+
+

Stream offline

+ +

+ No frames have been received for the stream on{" "} + {capitalizeFirstLetter(cameraConfig.name)} defined with the{" "} + detect role, check error logs +

+
)}