fix homepage videos skipping when buffering
This commit is contained in:
parent
4cd0be67b4
commit
d69d331138
|
@ -86,7 +86,11 @@ const videos = [
|
||||||
|
|
||||||
for (const video of videos) {
|
for (const video of videos) {
|
||||||
observer.observe(video);
|
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 = () => {
|
const onVisibilityChange = () => {
|
||||||
|
|
Loading…
Reference in a new issue