Skip to content

Instantly share code, notes, and snippets.


parzibyte/sonidos.js Secret

Created Sep 29, 2020
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