From c851bdca4dd6ffe94ec8ca0ecd9b5a54b8fc8d54 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 13 Oct 2021 16:35:28 +0100 Subject: [PATCH] pause only overlay --- app/static/js/ascroll.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 2a06e06..f68dd93 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -138,25 +138,28 @@ function showOverlay(event) { overlay.id = 'video-overlay' overlay.style.top = video.style.top overlay.style.width = rect.width + 'px' - overlay.style.height = (rect.height - 40) + 'px' + overlay.style.height = rect.height + 'px' overlay.style.position = 'absolute' overlay.style.display = 'flex' overlay.style.alignItems = 'center' overlay.style.justifyContent = 'center' overlay.style.fontSize = '45px' - video.controls = true + video.controls = false + + var off = `🔇` + var on = `🔊` if (video.muted) { - overlay.innerHTML = `🔇` + overlay.innerHTML = off } else { - overlay.innerHTML = `🔊` + overlay.innerHTML = on } overlay.addEventListener('click', event=> { video.muted = !video.muted if (video.muted) { - overlay.innerHTML = `🔇` + overlay.innerHTML = off } else { - overlay.innerHTML = `🔊` + overlay.innerHTML = on } }) var timeout = setTimeout(() => {