-
-
Save parzibyte/ba4aaf42aa14faad53ad0881c7e30fb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const cargarSonido = function (fuente) { | |
const sonido = document.createElement("audio"); | |
sonido.src = fuente; | |
sonido.setAttribute("preload", "auto"); | |
sonido.setAttribute("controls", "none"); | |
sonido.style.display = "none"; | |
document.body.appendChild(sonido); | |
return sonido; | |
} | |
const sonidoSuperiorIzquierda = cargarSonido("1.mp3"), | |
sonidoSuperiorDerecha = cargarSonido("2.mp3"), | |
sonidoInferiorIzquierda = cargarSonido("3.mp3"), | |
sonidoInferiorDerecha = cargarSonido("4.mp3"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment