mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-06 05:27:44 +03:00
ensure we always use an available stream
This commit is contained in:
parent
d08125a417
commit
5fce52a9fa
@ -549,9 +549,20 @@ export default function DraggableGridLayout({
|
|||||||
} else {
|
} else {
|
||||||
grow = "aspect-video";
|
grow = "aspect-video";
|
||||||
}
|
}
|
||||||
const streamName =
|
const availableStreams = camera.live.streams || {};
|
||||||
currentGroupStreamingSettings?.[camera.name]?.streamName ||
|
const firstStreamEntry = Object.values(availableStreams)[0] || "";
|
||||||
Object.values(camera.live.streams)[0];
|
|
||||||
|
const streamNameFromSettings =
|
||||||
|
currentGroupStreamingSettings?.[camera.name]?.streamName || "";
|
||||||
|
const streamExists =
|
||||||
|
streamNameFromSettings &&
|
||||||
|
Object.values(availableStreams).includes(
|
||||||
|
streamNameFromSettings,
|
||||||
|
);
|
||||||
|
|
||||||
|
const streamName = streamExists
|
||||||
|
? streamNameFromSettings
|
||||||
|
: firstStreamEntry;
|
||||||
const autoLive =
|
const autoLive =
|
||||||
currentGroupStreamingSettings?.[camera.name]?.streamType !==
|
currentGroupStreamingSettings?.[camera.name]?.streamType !==
|
||||||
"no-streaming";
|
"no-streaming";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user