Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Let's take a look at a simple implementation of the framework provided by Adobe. We created this example using OSMF build 0.9. The example creates a video player that plays a video using progressive download as an ActionSctipt 3.0 project:
package
{
import flash.display.Sprite;
import org.osmf.display.MediaPlayerSprite;
import org.osmf.media.URLResource;
import org.osmf.net.NetLoader;
import org.osmf.utils.URL;
import org.osmf.video.VideoElement;
/**
* The simplest OSMF application possible.
*
* The metadata sets the SWF size to match that of the video.
**/
[SWF(width="640", height="352")]
public class OSMFHelloWorld extends Sprite
{
public function OSMFHelloWorld()
{
// Create the Sprite class that holds our MediaPlayer.
var sprite:MediaPlayerSprite = new MediaPlayerSprite();
addChild(sprite);