如何使用Sound Manager 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>
任何帮助,将不胜感激 :)
我知道这个问题有点老了,但是在Google中它是最重要的结果。
您url
必须直接指向流URL(即提供媒体文件的URL,例如mp3),该URL可以从m3u或pls文件中提取。
它看起来应该像这样: http://198.15.94.34:8006/stream
有时,在流的末尾需要使用分号,如下所示: http://198.15.94.34:8006/stream;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句