2016-08-11 109 views
0

我正在使用Flowplayer(在Mean js音頻流項目中)用於使用Wowza流引擎軟件進行RTMP音頻流並使用角度js的以下服務。flowplayer播放列表曲目自動更改給出錯誤

app.service('flowPlayerService', ['$cookies','constant',function ($cookies,constant) { 
    player: null, 
    currentTitle:'', 
    constructPlaylist: function (playlist) { 


     var currentObj = this; 
     this.player = flowplayer("flashPlayer", "lib/flowplayer/flowplayer-3.2.18.swf", {   
      playlist:playlist, 
      onBegin: function(talk){ 
       console.log('clip changed'); 

      }, 
      onFail:function(){ 
       //alert('loading failed'); 
      }, 
      onFinish:function(){ 
       console.log('finisheds'); 

      }, 
      // engine:'html5', 
      // Specify the location of the RTMP plugin. 
      plugins: { 
       rtmp: { 
        url: 'lib/flowplayer/flowplayer.rtmp-3.2.13.swf', 
        netConnectionUrl: 'rtmp://10.10.3.11/vod' 
       }, 
       controls: { 
        autoHide: 'never', 
        url: 'lib/flowplayer/flowplayer.controls-3.2.16.swf', 
        tooltips: { 
         buttons: true, 
         fullscreen: false, 
         pause: 'Continue playing', 
        }, 

        playlist: true, 
        fullscreen:false, 
       }, 
       dock: { 
        enabled:false, 
        gap: 5, 
        autoHide: false 
       } 
      }, 
      onMouseOut:function(){ 
       console.log('mouse out'); 
      } 
      //canvas: {backgroundGradient: 'none'} 
     }); 
     console.log(this.player); 
     //this.player = flowplayer(); 

    }, 

}

在播放單聲道,它正在fine.But當我嘗試運行播放第一首曲目播放文件,但是當第一個曲目結束提示錯誤,如: -

VM36229:1 [ERROR] time 13:51:35.968 :: 201, Unable to load stream or clip file, cannot play video: Error #2154, clip: '[Clip] 'mp3:02 Jashn-E-Bahaara-1469775940586.mp3'' 

下面的播放列表陣列示例: -

[{ 
    url:"mp3:track.mp3", 
    provider:"rtmp", 
    title:'track title' 
    }, 
    { 
    url:"mp3:track1.mp3", 
    provider:"rtmp", 
    title:'track title1' 
    } 
    ] 

請大家幫忙。

回答

0

將「持續時間」傳遞給剪輯對象可解決此問題。