Skip to content

Instantly share code, notes, and snippets.

Created September 29, 2020 16:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
const cargarSonido = function (fuente) {
const sonido = document.createElement("audio");
sonido.src = fuente;
sonido.setAttribute("preload", "auto");
sonido.setAttribute("controls", "none"); = "none";
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