mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-18 14:18:21 +03:00
Make draggable live grid MSE video use cover fit
This commit is contained in:
parent
defa1dfabd
commit
937460abd0
@ -6,6 +6,7 @@ import {
|
|||||||
VideoResolutionType,
|
VideoResolutionType,
|
||||||
} from "@/types/live";
|
} from "@/types/live";
|
||||||
import {
|
import {
|
||||||
|
CSSProperties,
|
||||||
SetStateAction,
|
SetStateAction,
|
||||||
useCallback,
|
useCallback,
|
||||||
useEffect,
|
useEffect,
|
||||||
@ -799,6 +800,10 @@ function MSEPlayer({
|
|||||||
<video
|
<video
|
||||||
ref={videoRef}
|
ref={videoRef}
|
||||||
className={className}
|
className={className}
|
||||||
|
style={{
|
||||||
|
objectFit:
|
||||||
|
"var(--frigate-mse-object-fit, fill)" as CSSProperties["objectFit"],
|
||||||
|
}}
|
||||||
playsInline
|
playsInline
|
||||||
preload="auto"
|
preload="auto"
|
||||||
onLoadedData={() => {
|
onLoadedData={() => {
|
||||||
|
|||||||
@ -669,7 +669,7 @@ export default function DraggableGridLayout({
|
|||||||
useWebGL={useWebGL}
|
useWebGL={useWebGL}
|
||||||
cameraRef={cameraRef}
|
cameraRef={cameraRef}
|
||||||
className={cn(
|
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 &&
|
isEditMode &&
|
||||||
showCircles &&
|
showCircles &&
|
||||||
"outline-2 outline-muted-foreground hover:cursor-grab hover:outline-4 active:cursor-grabbing",
|
"outline-2 outline-muted-foreground hover:cursor-grab hover:outline-4 active:cursor-grabbing",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user