OSMF and Akamai Streams

  • strict warning: Non-static method view::load() should not be called statically in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/views.module on line 842.
  • strict warning: Declaration of content_handler_field::options() should be compatible with views_object::options() in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/cck/includes/views/handlers/content_handler_field.inc on line 208.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 25.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /nfs/c04/h03/mnt/64527/domains/jacksonkr.com/drupal-6.15/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.

For the last few hours I've been looking for info on how to do akamai streaming with the Adobe Open Source Media Framework. Mainly so we could take advantage of Akamai's CDN streaming (rtmp).

Apparently, it's easier than I thought it was going to be. Do the following and you'll be set.

var url:String = "rtmp://my.stream"; // or "http://my.video/123.mp4";

var player:MediaPlayer = new MediaPlayer();
var sprite:MediaPlayerSprite = new MediaPlayerSprite(player);
var ve:VideoElement = new VideoElement(new StreamingURLResource(url)); 
// use URLResource(url) if it's a non-stream
player.media = ve;

It's that simple. Download the OSMF Source here (make sure you get the .swc out). Instructions for where it put the swc file are here.

Also, here's an excellent resource I use in my stream development: http://support.akamai.com/flash/

 

UPDATE

I thought I was done with this, but I was wrong. I think I may have finally found the answer I've been looking for: Akamai's Basic Streaming OSMF Plugin. You'll find it in the OSMF Source in the folder libs:plugins:AkamaiBasicStreamingPlugin

Here's the extra code I added to my "player".

import com.akamai.osmf.AkamaiBasicStreamingPluginInfo;
import org.osmf.events.MediaFactoryEvent;
import org.osmf.media.PluginInfoResource;

var mediaFactory:DefaultMediaFactory = new DefaultMediaFactory();
mediaFactory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD, this.pluginLoadHandler);
mediaFactory.addEventListener(MediaFactoryEvent.PLUGIN_LOAD_ERROR, this.pluginLoadErrorHandler);
mediaFactory.loadPlugin(new PluginInfoResource(new AkamaiBasicStreamingPluginInfo()));

function pluginLoadHandler(event:MediaFactoryEvent):void {
  this.removeEventListener(MediaFactoryEvent.PLUGIN_LOAD, this.pluginLoadHandler);
  this.removeEventListener(MediaFactoryEvent.PLUGIN_LOAD_ERROR, this.pluginLoadErrorHandler);
  trace("pluginLoadHandler");
}
function pluginLoadErrorHandler(event:MediaFactoryEvent):void {
  throw new Error("DisplayPortal->pluginLoadErrorHandler");
}

That's it for now.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <pre>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
Complete this form and then pat yourself on the back.