This commit is contained in:
Josh Hawkins
2025-03-23 12:51:06 -06:00
committed by GitHub
parent e36fe79782
commit b7fcd41737
3 changed files with 44 additions and 14 deletions
+14 -3
View File
@@ -549,9 +549,20 @@ export default function DraggableGridLayout({
} else {
grow = "aspect-video";
}
const streamName =
currentGroupStreamingSettings?.[camera.name]?.streamName ||
Object.values(camera.live.streams)[0];
const availableStreams = camera.live.streams || {};
const firstStreamEntry = Object.values(availableStreams)[0] || "";
const streamNameFromSettings =
currentGroupStreamingSettings?.[camera.name]?.streamName || "";
const streamExists =
streamNameFromSettings &&
Object.values(availableStreams).includes(
streamNameFromSettings,
);
const streamName = streamExists
? streamNameFromSettings
: firstStreamEntry;
const autoLive =
currentGroupStreamingSettings?.[camera.name]?.streamType !==
"no-streaming";