mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-22 02:18:32 +01:00
Revert go2rtc call checks for enabled camera state (#17355)
* Revert "Fix camera enabled check (#17331)" This reverts commit1e45f63a7c. * Revert "Fix webUI generating HTTP500s when camera disabled (#17305)" This reverts commit644faaf65b.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useState, useCallback, useEffect, useMemo } from "react";
|
||||
import { useCameraActivity } from "@/hooks/use-camera-activity";
|
||||
import { IoIosWarning } from "react-icons/io";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
@@ -24,7 +23,6 @@ import { Checkbox } from "@/components/ui/checkbox";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import {
|
||||
FrigateConfig,
|
||||
CameraConfig,
|
||||
GroupStreamingSettings,
|
||||
StreamType,
|
||||
} from "@/types/frigateConfig";
|
||||
@@ -65,11 +63,6 @@ export function CameraStreamingDialog({
|
||||
|
||||
// metadata
|
||||
|
||||
// camera enabled state
|
||||
const { enabled: isCameraEnabled } = useCameraActivity(
|
||||
config?.cameras[camera] ?? ({} as CameraConfig),
|
||||
);
|
||||
|
||||
const isRestreamed = useMemo(
|
||||
() =>
|
||||
config &&
|
||||
@@ -78,7 +71,7 @@ export function CameraStreamingDialog({
|
||||
);
|
||||
|
||||
const { data: cameraMetadata } = useSWR<LiveStreamMetadata>(
|
||||
isCameraEnabled && isRestreamed ? `go2rtc/streams/${streamName}` : null,
|
||||
isRestreamed ? `go2rtc/streams/${streamName}` : null,
|
||||
{
|
||||
revalidateOnFocus: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user