Allow videos to block rotation until they're finished
This commit is contained in:
parent
8bc5c1167a
commit
8010e3197e
1 changed files with 4 additions and 0 deletions
|
@ -62,6 +62,10 @@
|
||||||
video.setAttribute('src', prefix + file + '.mp4');
|
video.setAttribute('src', prefix + file + '.mp4');
|
||||||
video.autoplay = true;
|
video.autoplay = true;
|
||||||
video.loop = true;
|
video.loop = true;
|
||||||
|
video.addEventListener('playing', function () {
|
||||||
|
var now = new Date();
|
||||||
|
window.waitUntil = now.getTime() + ((video.duration - video.currentTime) * 1000);
|
||||||
|
});
|
||||||
document.body.appendChild(video);
|
document.body.appendChild(video);
|
||||||
|
|
||||||
var time = document.getElementById('current-time');
|
var time = document.getElementById('current-time');
|
||||||
|
|
Loading…
Reference in a new issue