我正在使用 flowplayer 进行 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>