OSMF plug-in example

Posted: 26/04/10

An image of OSMF plug-in example

I recently gave a presentation to the OSMF User Group about the plug-in capabilities of the framework, and how these can be used to generate revenue from your content using video advertising.

In lieu of many plug-ins from the big ad-networks being ready for market just yet, in the presentation I showed an example that I'd put together that could be compiled into the application as a Static Plug-in, or loaded at runtime as a Dynamic Plug-in. The plug-in allowed the developer implementing it to wrap their VideoElements with mid-roll advertising, without necessarily needing to know how the advertising side of things worked. The ad-plug-in would then allow playback of the main content, injecting mid-roll adverts at the required frequency. This was achieved through the use of the ProxyElement class, which wrapped any media supplied to it through the plug-in MediaFactory.

I've uploaded the source for the Plug-in and a sample implementation, which you can download as a zip archive. You can then run these examples in either Flash CS4, CS5, Flex Builder 3 or Flash Builder 4. Once you're happy with the way the plug-in and the ProxyElement works, you can take a look at the VAST document that the AdSupportedProxyElement loads, to see how the VAST standard works too.

Obviously the example is incredibly simple, which was intentional for the purposes of demonstrating the framework. It lacks the extra bells and whistles that you'd want on your own advertising implementation - you wouldn't want to display an ad every 10 seconds, for example!!

These examples work fine with the Feature Complete release of OSMF (v0.95) as well as the older v0.93.

Download the presentation example code (ZIP)

Keywords for this post: osmf, advertising, pre-roll, plug-in, plugin, adobe, media, framework, video, stream, progressive, audio, image, actionscript 3