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…
Today I received an Android Dev Kit from Adobe! I posted a picture on my Twitter account: http://twitter.com/s9tpepper/status/18376097810
I've already got a few ideas and things I want to try on the Nexus One, so guess I know what I'll be doing for the next week when I get home from work.
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…
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…
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