Don't re-set waitUntil

This commit is contained in:
Henri Bergius 2018-12-26 16:13:50 +01:00
parent 8010e3197e
commit d0fd2bda1b
2 changed files with 6 additions and 0 deletions

View file

@ -63,6 +63,9 @@
video.autoplay = true;
video.loop = true;
video.addEventListener('playing', function () {
if (window.waitUntil) {
return;
}
var now = new Date();
window.waitUntil = now.getTime() + ((video.duration - video.currentTime) * 1000);
});

View file

@ -63,6 +63,9 @@
video.autoplay = true;
video.loop = true;
video.addEventListener('playing', function () {
if (window.waitUntil) {
return;
}
var now = new Date();
window.waitUntil = now.getTime() + ((video.duration - video.currentTime) * 1000);
});