-
-
-
-
-
- {videoLists.length > 0 && recordingsTable}
- {activeRecording != null && (
-
-
+
+
+ }
+ >
+
+
+
-
- )}
-
+
+
+
+ {videoLists.length > 0 && recordingsTable}
+ {activeRecording != null && (
+
+
+
+ )}
+
+
);
};
diff --git a/ui/src/Live/index.tsx b/ui/src/Live/index.tsx
index c97e7d4..9f3811d 100644
--- a/ui/src/Live/index.tsx
+++ b/ui/src/Live/index.tsx
@@ -6,39 +6,64 @@ import Container from "@mui/material/Container";
import ErrorIcon from "@mui/icons-material/Error";
import { Camera } from "../types";
import LiveCamera from "./LiveCamera";
-import Multiview from "./Multiview";
+import Multiview, { MultiviewChooser } from "./Multiview";
+import { FrameProps } from "../App";
+import { useSearchParams } from "react-router-dom";
+import { useState } from "react";
export interface LiveProps {
cameras: Camera[];
- layoutIndex: number;
+ Frame: (props: FrameProps) => JSX.Element;
}
-const Live = ({ cameras, layoutIndex }: LiveProps) => {
+const Live = ({ cameras, Frame }: LiveProps) => {
+ const [searchParams, setSearchParams] = useSearchParams();
+
+ const [multiviewLayoutIndex, setMultiviewLayoutIndex] = useState(
+ Number.parseInt(searchParams.get("layout") || "0", 10)
+ );
+
if ("MediaSource" in window === false) {
return (
-