diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index 7305881e1..3cbc1aa8d 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 "../ui/activity-indicator"; import { Button } from "../ui/button"; @@ -11,7 +11,6 @@ import { Label } from "../ui/label"; import { usePersistence } from "@/hooks/use-persistence"; import MSEPlayer from "./MsePlayer"; import JSMpegPlayer from "./JSMpegPlayer"; -import useSWR from "swr"; import { MdCircle } from "react-icons/md"; import Chip from "../Chip"; @@ -30,7 +29,6 @@ export default function LivePlayer({ cameraConfig, liveMode = "mse", }: LivePlayerProps) { - const { data: config } = useSWR("config"); const [showSettings, setShowSettings] = useState(false); const [options, setOptions] = usePersistence( @@ -76,10 +74,11 @@ export default function LivePlayer({ ); } else if (liveMode == "mse") { if ("MediaSource" in window || "ManagedMediaSource" in window) { + const camera = cameraConfig.name == "front_doorbell_cam" ? "portrait_cam" : cameraConfig.name player = ( ); } else { @@ -132,9 +131,13 @@ export default function LivePlayer({ return (
- {player} - + + +
+ {cameraConfig.name.replaceAll("_", " ")} +
+
); } diff --git a/web/src/pages/Live.tsx b/web/src/pages/Live.tsx index 43177e328..5de9ef30a 100644 --- a/web/src/pages/Live.tsx +++ b/web/src/pages/Live.tsx @@ -77,12 +77,20 @@ function Live() { )} -
+
{cameras.map((camera) => { + let grow; + if (camera.detect.width / camera.detect.height > 2) { + grow = "h-[424px] col-end-span-2"; + } else if (camera.name == "front_doorbell_cam") { + grow = "h-[840px]"; + } else { + grow = "h-[425px]"; + } return ( ); diff --git a/web/tailwind.config.js b/web/tailwind.config.js index dc84c91b1..d8e303c9f 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -82,6 +82,15 @@ module.exports = { "3xl": "1920px", "4xl": "2560px", }, + gridTemplateColumns: { + '3': 'repeat(3, 1fr)', + }, + gridTemplateRows: { + 'masonry': 'masonry', + }, + gridColumnEnd: { + 'span-2': 'span 2', + }, }, }, plugins: [require("tailwindcss-animate")],