Open matrixreal opened 9 years ago
load every sound one by one .
and how to do it ? what is the call ?
this is not a function of Ejecta and My fork. I think it like you load images
var audio=new Audio()
audio.src=url
audio.addEventListener("canplaythrough", function(){....});
audio.addEventListener("error", function(){....});
it work for local audio ? i mean that i want to preload sound on the game like the images (load into memory to avoid memory leak or game freez)
yes , could work for local audio
and we have to replace url by "media/sound.m4a" ?
yes
@finscn please , whats the javascript call to set sound to mute or silent ? thanks
audio.muted = true or audio.volume = 0
there is no way to let all audios be muted, you have to set that one by one .
hi, is there a way to preload / load all sound of game lunch ? thanks in advance