const bgMusic = document.getElementById("bgMusic"); const jumpSound = document.getElementById("jumpSound"); // Start music after first click (browser rule) document.addEventListener("click", () => { bgMusic.play(); }, { once: true });