如何使用“声音管理器2”来播放“大喊”流?我已经找到了可能的方法,并理解了如何流mp3文件,但我无法获得我需要提供的信息,以使它通过shoutcast流。
在我的<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>如能提供任何帮助,将不胜感激:)
发布于 2015-04-17 07:39:53
我知道这个问题有点老,但它是谷歌的头等大事。
您的url必须直接指向流URL (即提供媒体文件(如mp3)的URL ),该文件可以从m3u或pls文件中提取。
它应该是这样的:http://198.15.94.34:8006/stream
有时,流的末尾需要分号,如:http://198.15.94.34:8006/stream;
https://stackoverflow.com/questions/28769905
复制相似问题