【发布时间】:2015-04-30 10:48:43
【问题描述】:
如何使用 Sound Manager 2 流式传输播音流?我已经找到了很多方法并了解了如何流式传输 mp3 文件,但我无法获得需要提供哪些信息才能使其通过直播播放。
在我的<head> 区域中包含了 js 脚本,到目前为止我的播放代码是这样的:
<script>
soundManager.setup({
url: 'swf/',
flashVersion: 9, // optional: shiny features (default = 8)
// optional: ignore Flash where possible, use 100% HTML5 mode
// preferFlash: false,
onready: function() {
// Ready to use; soundManager.createSound() etc. can now be called.
soundManager.createSound({
id: 'mySound',
url: 'playlist.pls',
autoLoad: true,
autoPlay: true,
onload: function() {
soundManager.play('mySound','playlist.pls');
alert('The sound '+this.id+' is playing!');
},
volume: 50
});
}
});
</script>
任何帮助将不胜感激:)
【问题讨论】:
标签: javascript streaming shoutcast soundmanager2