mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
Improve image loading by not loading when off screen
This commit is contained in:
parent
f3784505e0
commit
1b6d11a2b0
@ -93,6 +93,7 @@ export default function CameraImage({
|
||||
"rounded-lg md:rounded-2xl",
|
||||
)}
|
||||
onLoad={handleImageLoad}
|
||||
loading="lazy"
|
||||
/>
|
||||
) : (
|
||||
<div className="pt-6 text-center">
|
||||
|
||||
@ -539,6 +539,7 @@ function PreviewFramesPlayer({
|
||||
<img
|
||||
ref={imgRef}
|
||||
className={`size-full rounded-lg bg-black object-contain md:rounded-2xl`}
|
||||
loading="lazy"
|
||||
onLoad={onImageLoaded}
|
||||
/>
|
||||
{previewFrames?.length === 0 && (
|
||||
|
||||
@ -29,7 +29,11 @@ function Live() {
|
||||
if (group) {
|
||||
setCameraGroup(cameraGroup);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// fullscreen
|
||||
|
||||
Loading…
Reference in New Issue
Block a user