Soundmanager will not play a sound
function doclick(){
soundManager.createSound({
id: 'mySound',
url: 'http://localhost/htmlshooter/wav/gun.wav',
autoLoad: true,
autoPlay: true,
volume: 100
});
mySound.play();
}
First it says:
SMSound._onload(): "mySound" failed to load? - htt开发者_运维百科p://localhost/htmlshooter/wav/gun.wav SMSound.play(): "mySound" is starting to play SMSound.play(): "mySound" is loading - attempting to play..
And then:
soundManager.createSound(): mySound exists soundManager.createSound(): mySound (http://localhost/htmlshooter/wav/gun.wav)
But in fact, its not playing any sound at all.
I dont think Soundmanager2 plays Wav files. You could try enabling HTML5 support on SM2 maybe?
精彩评论