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(() => {