之前搞了个soundmanager发现只能播放mp3 今天想看看soundManager2能不能播放wav文件,结构看了一天的外国网站最后证明,在我这没有html5的基础上市部能播放wav文件的
在soudmanager官网的上说
http://www.schillmania.com/projects/soundmanager2/doc/#sm-config
only html5,之前还死活不相信呢,最后验证了,在谷歌下可以播放,le下不能播放
<!DOCTYPE html>
<html>
<head>
<title>SoundManager 2: wav play</title>
</head>
<body>
<script src="./script/soundmanager2.js"></script>
<script>
soundManager.setup({
url: 'swf/',
onready: function() {
var mySound = soundManager.createSound({
id:"ccc",
autoLoad: true,
autoPlay: true,
type:'audio/wav',
url:'133.wav'
});
}
});
function doclick(){ alert(1);
soundManager.createSound({
id: 'bbb',
url: '133.wav',
autoLoad: true,
autoPlay: true,
volume: 100
});
bbb.play();
}
</script>
<a href="#" onclick="soundManager.play('ccc')" >play</a>
<button type="button" onclick="doclick();">Click Me! id--bbb</button>
</body>
</html>
在google下可以,在le下部行
相关接触到的文章,可以看看
http://segmentfault.com/q/1010000000143557
http://stackoverflow.com/questions/5777066/soundmanager-will-not-play-a-sound
http://www.helprex.com/questions/how-to-play-a-wav-file-using-soundmanager2-526/
http://stackoverflow.com/questions/5777066/soundmanager-will-not-play-a-sound