mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-05 22:57:40 +03:00
Merge pull request #83 from ibs0d/revert-82-claude/fix-preview-aspect-ratio-GZq8u
Revert "fix: preserve aspect ratio in preview players during timeline scrubbing"
This commit is contained in:
commit
08b1c43c16
@ -281,7 +281,7 @@ function PreviewVideoPlayer({
|
|||||||
<div
|
<div
|
||||||
ref={visibilityRef}
|
ref={visibilityRef}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-full items-center justify-center overflow-hidden rounded-lg bg-black md:rounded-2xl",
|
"relative flex w-full justify-center overflow-hidden rounded-lg bg-black md:rounded-2xl",
|
||||||
onClick && "cursor-pointer",
|
onClick && "cursor-pointer",
|
||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
@ -289,7 +289,7 @@ function PreviewVideoPlayer({
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className={`max-h-full max-w-full object-contain ${currentHourFrame ? "visible" : "invisible"}`}
|
className={`absolute size-full object-contain ${currentHourFrame ? "visible" : "invisible"}`}
|
||||||
src={currentHourFrame}
|
src={currentHourFrame}
|
||||||
onLoad={() => {
|
onLoad={() => {
|
||||||
if (changeoverTimeout) {
|
if (changeoverTimeout) {
|
||||||
@ -303,7 +303,7 @@ function PreviewVideoPlayer({
|
|||||||
{isVisible && (
|
{isVisible && (
|
||||||
<video
|
<video
|
||||||
ref={previewRef}
|
ref={previewRef}
|
||||||
className={`max-h-full max-w-full object-contain ${currentHourFrame ? "invisible" : "visible"}`}
|
className={`absolute size-full object-contain ${currentHourFrame ? "invisible" : "visible"}`}
|
||||||
preload="auto"
|
preload="auto"
|
||||||
autoPlay
|
autoPlay
|
||||||
playsInline
|
playsInline
|
||||||
@ -348,7 +348,7 @@ function PreviewVideoPlayer({
|
|||||||
{t("noPreviewFoundFor", { camera: cameraName })}
|
{t("noPreviewFoundFor", { camera: cameraName })}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{firstLoad && <Skeleton className="aspect-video w-full" />}
|
{firstLoad && <Skeleton className="absolute aspect-video size-full" />}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -554,7 +554,7 @@ function PreviewFramesPlayer({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-full items-center justify-center",
|
"relative flex w-full justify-center",
|
||||||
className,
|
className,
|
||||||
onClick && "cursor-pointer",
|
onClick && "cursor-pointer",
|
||||||
)}
|
)}
|
||||||
@ -562,7 +562,7 @@ function PreviewFramesPlayer({
|
|||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
ref={imgRef}
|
ref={imgRef}
|
||||||
className="max-h-full max-w-full rounded-lg object-contain md:rounded-2xl"
|
className={`size-full rounded-lg bg-black object-contain md:rounded-2xl`}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
onLoad={onImageLoaded}
|
onLoad={onImageLoaded}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user