@BaByGeRRy
I change the code for audio thing and after cleaning cache and restarting the server, audio works fine, to stop it I have to press spacebar 2 times but after that you can pause it and play it again
Also noticed if you click on the screen you pause the music!
Btw, really good job! The loading screen is cool
<audio controls id="leson" src="music/music.ogg" type="audio/ogg" hidden="true" loop="true"/>
<script>
var play = false;
var myAudio = document.getElementById("leson");
myAudio.autoplay = true;
myAudio.load();
myAudio.volume = 0.7;
function onKeyDown(event) {
switch (event.keyCode) {
case 32: //SpaceBar
if (play) {
myAudio.pause();
play = false;
} else {
myAudio.play();
play = true;
}
break;
}
return false;
}
window.addEventListener("keydown", onKeyDown, false);
</script>