fix homepage videos skipping when buffering

This commit is contained in:
outfoxxed 2025-01-19 19:12:03 -08:00
parent 4cd0be67b4
commit d69d331138
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

View file

@ -86,7 +86,11 @@ const videos = [
for (const video of videos) {
observer.observe(video);
video.addEventListener("ended", nextVideo)
video.addEventListener("ended", () => {
// The "ended" event might just mean its buffering.
if (video.duration !== 0 && video.currentTime === video.duration) nextVideo();
});
}
const onVisibilityChange = () => {