Sound Manager 2流应播放

Sound Manager 2 stream shoutcast

本文关键字:播放 Manager Sound      更新时间:2024-07-14

如何使用Sound Manager 2流式传输shoutcast流?我已经找到了可能的方法,并了解如何流式传输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>

如有任何帮助,我们将不胜感激:)

我知道这个问题有点老了,但它在谷歌中排名第一。

您的url必须直接指向流URL(即,提供媒体文件(如mp3)的URL),该URL可以从m3u或pls文件中提取。

它应该是这样的:http://198.15.94.34:8006/stream

有时,在流的最后需要一个分号,如下所示:http://198.15.94.34:8006/stream;