mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
start loading youtube just before it appears on the screen
This commit is contained in:
parent
760477f00c
commit
93e3b95362
1 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,8 @@ function setupYouTubeLazyLoad() {
|
||||||
videoObserver.unobserve(videoWrapper);
|
videoObserver.unobserve(videoWrapper);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}, {
|
||||||
|
rootMargin: "0px 0px 300px 0px" // Preload when 300px away from the viewport
|
||||||
});
|
});
|
||||||
|
|
||||||
lazyVideos.forEach((video) => {
|
lazyVideos.forEach((video) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue