Adobe’s free and open source media playback system

Posts tagged "plugin dynamic"

The plugin framework for OSMF can appear complicated at first glance, but from the point of view of a player developer, it’s actually fairly simple. Loading plugins can be as simple as one line of code added to an existing player. Early versions of the framework required the plugin exist on the same domain, but now the framework can load plugins cross domain, given that the player is hosted from an http:// url and the plugin is also hosted from an http:// url, and the plugin’s webserver has the appropriate cross-domain policy file in place. This means loading a player locally (using a file:// style url) won’t work with dynamic plugins. A local webserver is the suggested setup.
Using the PluginManager, a plugin can be loaded in one line of code. The following code snippet demonstrates how one might load a CDN plugin:

The above code snippet will attempt to load the plugin at http://example.com/samplePlugin.swf. This line needs to be changed to the location of the plugin the player wants loaded. For instance it can be changed to the location of the Akamai plugin, once Akamai releases their CDN plugin.

This feature releases the player developer from having to maintain plugin code. It allows bug fixes and updates to reach players using 3rd party plugins, without having to recompile players.