fix: add object-contain to HlsVideoPlayer and PreviewPlayer video elements

Ensures recorded video playback preserves aspect ratio instead of
stretching to fill the container. MsePlayer (live grid) is unchanged.

https://claude.ai/code/session_01SxrckSRTA8Hrd3d7M4qw4i
This commit is contained in:
Claude 2026-03-20 10:13:23 +00:00
parent d8b68b53b5
commit b61719e226
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ export default function HlsVideoPlayer({
)}
<video
ref={videoRef}
className={`size-full rounded-lg bg-black md:rounded-2xl ${loadedMetadata ? "" : "invisible"} cursor-pointer`}
className={`size-full object-contain rounded-lg bg-black md:rounded-2xl ${loadedMetadata ? "" : "invisible"} cursor-pointer`}
preload="auto"
autoPlay
controls={!frigateControls}

View File

@ -303,7 +303,7 @@ function PreviewVideoPlayer({
{isVisible && (
<video
ref={previewRef}
className={`absolute size-full ${currentHourFrame ? "invisible" : "visible"}`}
className={`absolute size-full object-contain ${currentHourFrame ? "invisible" : "visible"}`}
preload="auto"
autoPlay
playsInline