Posts Tagged ‘Cloudfront’

RTMP Streaming Video from Cloudfront

Written by craighicks13 on . Posted in Sandbox

So I’ve recently been looking into streaming videos from cloudfront. For some reason I was surprised to found out that cloudfront uses Flash Media Server 3.5 for streaming videos and now need to try it out. I’m a fan of OSMF and have been using Strobe Media Playback for my videos for it’s dead simple implementation. I also noticed that JW Player is widely used for this implementation as well. This post is for me to reference how to implement both players using cloudfront streaming.

Here are the basic properties that need to passed to each player:

// JW Player Properties

flashvars.file = “mp4:halloweenParty.mp4”;
flashvars.streamer = “rtmp://”;
flashvars.provider = “rtmp”;
flashvars.image = “”;

// Strobe Properties

flashvars.src = “rtmp://”;
flashvars.poster = “”;
flashvars.urlIncludesFMSApplicationInstance = true;

Here is the JW Player in action:

And the Strobe player:

While I’m at it, here is the code that I use to embed videos.

<script type="text/javascript">// <![CDATA[
  var flashvars = {};
  flashvars.src = "rtmp://";
  flashvars.poster = "";
  flashvars.urlIncludesFMSApplicationInstance = true;
  var params = {}; 
  params.allowfullscreen = "true";
  params.allowscriptaccess = "always";
  var attributes = {};
  swfobject.embedSWF("", "video_div", "512", "288", "10.1.0", "", flashvars, params, attributes);
// ]]></script>

Built with HTML5 and CSS3
Copyright © 2015 Develop Digital