Bitrate hints from RSS
HTML
<a
href="bbb_480x270"
style="display:block;width:480px;height:270px"
id="player">
</a>
Configuration
flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.11.swf", {
// The playlist is loaded from the RSS file
playlist: "/demos/standalone/plugins/streaming/bitrates.xml",
plugins: {
// bandwidth check plugin
bwcheck: {
url: "http://releases.flowplayer.org/swf/flowplayer.bwcheck-3.2.10.swf",
// HDDN uses Wowza servers
serverType: 'wowza',
// we use dynamic switching, the appropriate bitrate is switched on the fly
dynamic: true,
netConnectionUrl: 'rtmp://rtmp01.hddn.com/play',
// show the selected file in the content box. This is not used in real
// installations.
onStreamSwitchBegin: function(newItem, currentItem) {
$f().getPlugin('content').setHtml(
"Will switch to: " + newItem.streamName +
" from " + currentItem.streamName);
},
onStreamSwitch: function(newItem) {
$f().getPlugin('content').setHtml(
"Switched to: " + newItem.streamName);
}
},
// RTMP streaming plugin
rtmp: {
url: "http://releases.flowplayer.org/swf/flowplayer.rtmp-3.2.10.swf",
netConnectionUrl: 'rtmp://rtmp01.hddn.com/play'
},
// a content box so that we can see the selected bitrate. This is not normally
// used in real installations.
content: {
url: "http://releases.flowplayer.org/swf/flowplayer.content-3.2.8.swf",
top: 0,
left: 0,
width: 400,
height: 150,
backgroundColor: 'transparent',
backgroundGradient: 'none',
border: 0,
textDecoration: 'outline',
style: {
body: {
fontSize: 14,
fontFamily: 'Arial',
textAlign: 'center',
color: '#ffffff'
}
}
} }
});
RSS File with bitrates
The bit-rates are specified using markup specified in the Yahoo Media RSS format. Flowplayer specific clip properties are specified in the fp:clip element. Here is the file used in the example above:
<rss version="2.0"
xmlns:media="http://search.yahoo.com/mrss/"
xmlns:fp="http://flowplayer.org/fprss/">
<channel>
<title>Playlist with bitrates</title>
<item>
<title>RTMP streaming</title>
<description>RTMP streaming from a Wowza 2 server hosted by HDDN</description>
<media:group>
<media:content bitrate="800" width="480"
url="mp4:vod/demo.flowplayervod/bbb-800.mp4" type="video/h264" />
<media:content bitrate="1200" width="720"
url="mp4:vod/demo.flowplayervod/bbb-1200.mp4" type="video/h264" />
<media:content bitrate="1600" width="1080"
url="mp4:vod/demo.flowplayervod/bbb-1600.mp4" type="video/h264" />
</media:group>
<fp:clip provider="rtmp" autoPlay="false" urlResolvers="bwcheck" scaling="fit" />
</item>
</channel>
</rss>
See the Flowplayer RSS file support documentation for more details on how to use them.