开发者

Soundmanager will not play a sound

开发者 https://www.devze.com 2023-02-28 18:15 出处:网络
function doclick(){ soundManager.createSound({ id: \'mySound\', url: \'http://localhost/htmlshooter/wav/gun.wav\',
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?

0

精彩评论

暂无评论...
验证码 换一张
取 消