Sound Manager 2流shoutcast

问题描述 投票:0回答:1

如何使用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>

任何帮助,将不胜感激 :)

javascript streaming shoutcast soundmanager2
1个回答
1
投票

我知道这个问题有点旧,但它在谷歌中成为最佳结果。

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

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

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

© www.soinside.com 2019 - 2024. All rights reserved.