Real-Time Messaging Protocol (RTMP) is an open-source protocol owned by Adobe that’s designed to stream audio and video by maintaining low latency connections. This article provides the source code required to implement an RTMP stream in slow-motion using Flowplayer.
Source Code
<div><a href="vod/ZONE.ALIAS/Extremists.flv" style="display:block;width:640px;height:480px;" id="player1"></a></div>
<script type="text/javascript">
flowplayer("player1", "flowplayer/flowplayer-3.2.1-dev.swf", {
log: {
level: 'debug',
filter: 'org.flowplayer.slowmotion.*'
},
plugins: {
slowmotion: {
url: '/flowplayer/flowplayer.slowmotion-3.2.0.swf'
},
rtmp: {
url: '/flowplayer/flowplayer.rtmp-3.2.0.swf',
netConnectionUrl: 'rtmp://r.ZONE.ALIAS.netdna-cdn.com/play'
},
speedIndicator: {
url: 'flowplayer/flowplayer.content-3.2.0.swf',
bottom: 50,
right: 15,
width: 135,
height: 30,
border: 'none',
style: {
body: {
fontSize: 12,
fontFamily: 'Arial',
textAlign: 'center',
color: '#ffffff'
}
},
backgroundColor: 'rgba(20, 20, 20, 0.5)',
display: 'none'
},
controls: {
tooltips: {
buttons: true
}
}
},
clip: {
provider: 'rtmp',
scaling: 'orig'
}
});
$f().onLoad(function () {
$("#actions").css("opacity", 1);
$("#actions button").removeAttr("disabled")
});
$f().onUnload(function () {
$("#actions").css("opacity", 0.5);
$("#actions button").attr("disabled", true)
});
var actions = {
backward: function (speed) {
$f().getPlugin('slowmotion').backward(speed)
},
forward: function (speed) {
$f().getPlugin('slowmotion').forward(speed)
},
normal: function () {
$f().getPlugin('slowmotion').normal()
}
}
</script>
<div id="actions" style="text-align:center;opacity:1;width:640px;margin-top: 10px;">
<button type="button" disabled onclick="actions.backward(8)"> Back 8 x </button>
<button type="button" disabled onclick="actions.backward(4)"> Back 4 x </button>
<button type="button" disabled onclick="actions.backward(2)"> Back 2 x </button>
<button type="button" disabled onclick="actions.normal()"> Normal </button>
<button type="button" disabled onclick="actions.forward(2)"> Fwd 2 x </button>
<button type="button" disabled onclick="actions.forward(4)"> Fwd 4 x </button>
<button type="button" disabled onclick="actions.forward(8)"> Fwd 8 x </button>
<button type="button" disabled onclick="actions.backward(0.25)"> Backward 1/4 </button>
<button type="button" disabled onclick="actions.backward(0.5)"> Backward half </button>
<button type="button" disabled onclick="actions.forward(0.5)"> Forward half </button>
<button type="button" disabled onclick="actions.forward(0.25)"> Forward 1/4 </button>
</div>
If you have any questions or experience any issues, please reach out to the Support Team, live chat and ticket support are available 24/7.