Fix jsmpeg player component (#10425)

* fix jsmpeg component

* preserve aspect ratio

* remove forcing of jsmpeg

* full height only
This commit is contained in:
Josh Hawkins
2024-03-13 09:00:37 -05:00
committed by GitHub
parent 9d01a7dc74
commit 79ca599ace
2 changed files with 5 additions and 51 deletions

View File

@@ -125,7 +125,7 @@ export default function LivePlayer({
} else if (liveMode == "jsmpeg") {
player = (
<JSMpegPlayer
className="w-full flex justify-center rounded-2xl overflow-hidden"
className="size-full flex justify-center rounded-2xl overflow-hidden"
camera={cameraConfig.name}
width={cameraConfig.detect.width}
height={cameraConfig.detect.height}
@@ -137,7 +137,7 @@ export default function LivePlayer({
return (
<div
className={`relative flex justify-center w-full outline cursor-pointer ${
className={`relative flex justify-center ${liveMode == "jsmpeg" ? "size-full" : "w-full"} outline cursor-pointer ${
activeTracking
? "outline-severity_alert outline-1 rounded-2xl shadow-[0_0_6px_2px] shadow-severity_alert"
: "outline-0 outline-background"