Make draggable live grid MSE video use cover fit

This commit is contained in:
ibs0d 2026-03-08 19:27:11 +11:00
parent defa1dfabd
commit 937460abd0
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {
VideoResolutionType,
} from "@/types/live";
import {
CSSProperties,
SetStateAction,
useCallback,
useEffect,
@ -799,6 +800,10 @@ function MSEPlayer({
<video
ref={videoRef}
className={className}
style={{
objectFit:
"var(--frigate-mse-object-fit, fill)" as CSSProperties["objectFit"],
}}
playsInline
preload="auto"
onLoadedData={() => {

View File

@ -669,7 +669,7 @@ export default function DraggableGridLayout({
useWebGL={useWebGL}
cameraRef={cameraRef}
className={cn(
"size-full rounded-lg bg-black md:rounded-2xl",
"draggable-live-grid-mse-cover size-full rounded-lg bg-black [--frigate-mse-object-fit:cover] md:rounded-2xl",
isEditMode &&
showCircles &&
"outline-2 outline-muted-foreground hover:cursor-grab hover:outline-4 active:cursor-grabbing",