2013-06-24 27 views
0

我使用流式播放器进行http直播,当流媒体从开始播放而不是从现场播放时遇到麻烦。我不知道代码中是否有任何错误或缺少任何参数。Flowplayer f4m流开始于开始

请帮忙!

<script language="JavaScript"> 
flowplayer('player', 'http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf', { 
    clip: { 
     // the manifest file 
     url: '(httpurl).f4m', 
     ipadUrl: '(httpurl).m3u8', 
     // we need 2 urlResolvers 
     urlResolvers: ['f4m','bwcheck'], 




     // use the httpstreaming plugin 
     provider: 'httpstreaming', 

     // directory where the manifest and video fragments are stored 
     baseUrl: 'http://stream.flowplayer.org/httpstreaming/', 
     live: true, 
     autoPlay: true 
    }, 
    plugins: { 
     f4m: { 
      url: 'http://releases.flowplayer.org/swf/flowplayer.f4m-3.2.9.swf', 

     }, 
     httpstreaming: { 
      url: 'http://releases.flowplayer.org/swf/flowplayer.httpstreaming-3.2.10.swf', 
     startLivePosition: true 
     }, 
     controls: { 
      // the 'tube' skin 
      url: 'http://releases.flowplayer.org/swf/flowplayer.controls-tube-3.2.15.swf' 
     }, 

     bwcheck: { 
      url: 'http://releases.flowplayer.org/swf/flowplayer.bwcheck-httpstreaming-3.2.12.swf', 
      dynamic: true, 
      // show the selected file in the content box 
      // usually omitted in production 
      onStreamSwitchBegin: function (newItem, currentItem) { 
       var content = $f('httpstreaming-dynamic').getPlugin('content'); 
       var message = 'Will switch to: ' + 
           newItem.streamName + 
           ' from ' + 
           currentItem.streamName; 
       content.setHtml(message); 
      }, 
      onStreamSwitch: function (newItem) { 
       var content = $f('httpstreaming-dynamic').getPlugin('content'); 
       var message = 'Switched to: ' + newItem.streamName; 
       content.setHtml(message); 
      } 
     }, 

     // a content box to display the selected bitrate 
     // usually omitted in production 
     content: { 
      url: 'http://releases.flowplayer.org/swf/flowplayer.content-3.2.8.swf', 
      bottom: 30, 
      left: 0, 
      width: 400, 
      height: 150, 
      backgroundColor: 'transparent', 
      backgroundGradient: 'none', 
      border: 0, 
      textDecoration: 'outline', 
      style: { 
       body: { 
        fontSize: 14, 
        fontFamily: 'Arial', 
        textAlign: 'center', 
        color: '#ffffff' 
       } 
      } 
     } 
    } 
}).ipad(); 
</script> 

回答

1

在剪辑配置中放置一个“start:-1”指令。

为我工作!

clip { 
... 
    // directory where the manifest and video fragments are stored 
    baseUrl: 'http://stream.flowplayer.org/httpstreaming/', 
    live: true, 
    autoPlay: true, 
    start: -1 
},