Note: This feature applies only to Flash player.

At server side

The feature lets dynamic delivery of streaming videos by alternating among various playback streams. To set up dynamic streaming, point to the dynamic streaming video using the source attribute in cfmediaplayer as follows:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="application/javascript">
functi on getStreamData()
{
var player = ColdFusion.MediaPlayer.getPlayer("player_ds");
var dynamicStreams=player.getStreamItems();
for (var idx = 0; idx < dynamicStreams.length; idx ++)
{
var streamLabel = dynamicStreams[idx]['width'] + "x" + dynamicStreams[idx]['height'] + " @ " + dynamicStreams[idx]['bitrate'] + "kbps";
var element = document.createElement("option");
element.innerHTML = streamLabel;
document.getElementById("streams").appendChild(element);
if (idx==player.getCurrentDynamicStreamIndex())
{
document.getElementById("streams").selectedIndex = idx;
}
}
}
function selectionChange()
{
var index = document.getElementById("streams").selectedIndex;
var player = ColdFusion.MediaPlayer.getPlayer("player_ds");
player.setAutoDynamicStreamSwitch(false);
player.switchDynamicStreamIndex(index);
}
</script>
</head>
<body>
<div align="center">
<br />
<br />
<br />
<button type="button" onclick="getStreamData()" value="Stream Details" name= "Stream Details"> Stream Details</button>
<br />
<br />
<select name="streams" id="streams" onchange="selectionChange()">
</select>
<br />
</div>
<cfmediaplayer
name="player_ds"
source="URL to the F4M file" width=800 height=500 type="flash"
autoplay="true"
align="center"
>
</cfmediaplayer>
</body>
</html>

At client side

At the client-side, you have the HD controls which can be used to toggle between different streaming videos available.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy