mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -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);
|
||||
}
|
||||
});
|
||||
}, {
|
||||
rootMargin: "0px 0px 300px 0px" // Preload when 300px away from the viewport
|
||||
});
|
||||
|
||||
lazyVideos.forEach((video) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue