流媒体不播放mp3

时间:2012-09-26 11:43:21

标签: javascript flowplayer

我使用flowplayer播放mp3。但我有一个错误;

202未加载此剪辑中指定的提供者,提供者audio.clip:[clip]

我没有使用它并且错误以前使用过。

<script src='<%= ResolveUrl("~/Components/flowplayer/flowplayer-3.1.1.min.js") %>' type="text/javascript"></script>
<script>
var playerpath = '<%= ResolveUrl("~/Components/flowplayer/flowplayer-3.2.7.swf") %>';
var playerid = '<%= this.lnkPlayer.ClientID %>';
var _autoplay = '<%= this.AutoPlay %>' == "True";
var _autobuffering = '<%= this.AutoBuffering %>' == "True";
flowplayer(playerid, playerpath, {
    clip: {
        autoPlay: _autoplay,
        autoBuffering: _autobuffering  
        ,provider: '<%= provider %>'
    },
    plugins: {
        rtmp: {
            url: '<%= ResolveUrl("~/Components/flowplayer/flowplayer.rtmp-3.2.3.swf")%>'
        }
    }
}); 

你知道吗? 谢谢你。

1 个答案:

答案 0 :(得分:0)

对于其他人,如有必要,解决方案是;

   <script src='<%= ResolveUrl("~/Components/flowplayer/flowplayer-3.1.1.min.js") %>' type="text/javascript"></script>
   <asp:HyperLink runat="server"  ID="lnkPlayer"></asp:HyperLink>

<script>
   var playerid = '<%= this.lnkPlayer.ClientID %>';
   var _autoplay = '<%= this.AutoPlay %>' == "True";
   var _autobuffering = '<%= this.AutoBuffering %>' == "True";
 flowplayer(playerid, {
   src: "http://releases.flowplayer.org/swf/*flowplayer-3.2.15.swf",
   version: [10, 1],
    clip: {
      autoPlay: _autoplay,
      autoBuffering: _autobuffering  // <- do not place a comma here   
      , provider: 'rtmp'
          },
    plugins: {
         rtmp: {
             url: '<%= ResolveUrl("~/Components/flowplayer/flowplayer.rtmp-3.2.11.swf") %>'
                }
             }
    });
  </script>

for flowplayer-3.1.1.min.js - &gt; http://releases.flowplayer.org/flowplayer/flowplayer-3.2.15.zip for flowplayer.rtmp-3.2.11.swf - &gt; http://releases.flowplayer.org/flowplayer.rtmp/flowplayer.rtmp-3.2.11.zip

(它的工作原理是mp3,mp4和flv)