我正在使用流媒体播放器进行http直播,当流媒体播放从播放而不是直播播放时,就会遇到麻烦。我不知道代码中是否有任何错误,或者是否缺少任何参数。
请帮忙!
<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>
答案 0 :(得分: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
},