let hideControlsTimer = null;
players.addEventListener('mousemove', updateHideControlsTimer)
players.addEventListener('click', updateHideControlsTimer)
function updateHideControlsTimer(){
if (hideControlsTimer) clearTimeout(hideControlsTimer)
hideControlsTimer = setTimeout(hideControls, 2000)
}
function hideControls(){
hideControlsTimer = null
controls.classList.add('fade')
}
.wm { margin-top: 20%; transition: margin .1s ease-out .05s;}
.wm2 { margin-top: 0; transition: margin .1s ease-out .05s;}
if (x.className === "wm" ) {
x.className = "wm2";
} else {x.className = "wm"; };