Almer/Blank Labs

Four New OSMF Adobe Cookbook Recipes

Evenin' all:

I posted four new OSMF recipes on Adobe's cookbook site this afternoon, and thought you might care to see 'em:

Playing Multiple Pieces of Media, Consecutively, with the OSMF ParallelElement
Playing Multiple Pieces of Media, Concurrently, with the OSMF ParallelElement
Dynamic Streaming with OSMF
HTTP Streaming in OSMF

And, as a reminder along these lines, I'm teaching this year at MAX, as a MAX Master, on 'Designing Custom Video Players with OSMF' (you can browse the catalog of talks and presentations and then you can register here).

Share and enjoy!

-r …read more…

OSMF Sample Player Update for 1.0

I've finally started work on my OSMF lab for MAX, 'Designing Custom Video Players with OSMF' (you can browse the catalog of talks and presentations and then you can register here).

As you may know, OSMF 1.0 has been release, so one of the first tasks I set for myself was to test the code I wrote in April for OSMF 0.95 (which I posted, along with the screencasts of my talk at FITC, here). And, lo and behold, all of them worked!

Well, all except one. The final demo file, the Full Sample Player was playing, but the video was invisible and all the controls were disabled. So I set out to figure out why. (For those who don't want to read to the end, you can download the updated project file, for Flash CS5, here.)

…read more…

New Intro to Adobe OSMF Videos

I tried to record my 'Standardize Your Flash with Adobe OSMF' talk from FITC Toronto — and, lo and behold, it actually seems to have worked.

So I edited it down a bit (cutting out the Q&A, which unfortunately was not audible on my microphone), chopped the sections down into individual videos, and posted them to YouTube. I thought it might be a good reference if I embedded all of them in a single post, along with the source code you'll want for each lesson if you wish to follow along in Flash CS4 or CS5.

In this talk, I cover:
- what is OSMF
- OSMF capabilities
- The basic structure of an OSMF player, including the MediaElement, MediaPlayer and MediaComposition
- Dynamic Streaming (the files for that video also include HTTP Streaming)
- Subclipping
- The key MediaPlayer properties and events required to build a media player

…read more…

Illustrator CS5 to Flex4, so simple.

While I was doing some work this morning on a Flex4 application I found a pretty neat way of integrating Illustrator CS5 assets into Flex 4 with relative ease using FXG 2.0. I haven't tested this method using other versions of FXG, but using 2.0 works great. …read more…

Dynamic Streaming in OSMF 10

I'm writing some new sample files for OSMF in preparation for my presentation, 'Standardize Your Flash with Adobe OSMF,' which I'll be giving on April 27th at FITC Toronto.

Last time I checked (February), OSMF was in Sprint 9 (and I updated my sample files at that time, posted here). Now, it's in Sprint 10, specifically version 0.93. And Adobe appears to have done a lot to lock down the API, which is definitely an exciting and positive development.

But, of course, there are some significant changes since the Sprint 9 OSMF framework — so even the files I posted just two months ago are no longer valid. So, since I wrote it as one of the sample files for my talk, I figured I would post the code to run dynamic streaming with OSMF v0.93.

Here is a Flash CS4 document class, assuming you already have your OSMF SWC in your library path.

package 
{ 
    import flash.display.Sprite; 
 
	import org.osmf.media.MediaPlayer;
	import org.osmf.containers.MediaContainer;
	import org.osmf.media.URLResource;
	import org.osmf.net.NetLoader;
	import org.osmf.elements.VideoElement;
	import org.osmf.utils.URL;
	import org.osmf.net.DynamicStreamingResource ;
	import org.osmf.net.DynamicStreamingItem ;
 
    public class MyPlayer extends Sprite 
    { 
 
		private const RTMP_URL : String = "rtmp://myhost" ;
 
        public function MyPlayer() 
        { 
			player = new MediaPlayer ( ) ;
			container = new MediaContainer ( ) ;
			addChild ( container ) ;
			//set the player to play videos only once by default
			player.autoRewind=false;
			var resource : DynamicStreamingResource = new DynamicStreamingResource ( RTMP_URL ) ;
			var vector : Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem> ( 3 ) ;
			vector [ 0 ] = new DynamicStreamingItem ( "myMovie_high" , 1500 ) ; 
			vector [ 1 ] = new DynamicStreamingItem ( "myMovie_low" , 400 ) ; 
			vector [ 2 ] = new DynamicStreamingItem ( "myMovie_medium" , 600 ) ; 
			resource.streamItems = vector ;
			videoElement = new VideoElement( resource ) ;
			player.media = videoElement ;
			container.addMediaElement ( videoElement ) ;
        } 
 
		private var player:MediaPlayer;
		private var container:MediaContainer;
		private var videoElement : VideoElement ;
 
    } 
}

Share and enjoy!

-r