From d0fd2bda1b06f4396e06e3cf2f4c878e0818dab2 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Wed, 26 Dec 2018 16:13:50 +0100 Subject: [PATCH] Don't re-set waitUntil --- 35c3-video/index.html | 3 +++ video/index.html | 3 +++ 2 files changed, 6 insertions(+) diff --git a/35c3-video/index.html b/35c3-video/index.html index b397097..4cba487 100644 --- a/35c3-video/index.html +++ b/35c3-video/index.html @@ -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); }); diff --git a/video/index.html b/video/index.html index d8adae5..0a21d38 100644 --- a/video/index.html +++ b/video/index.html @@ -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); });