Adobe Open Source Media Framework (OSMF) – formerly Strobe
Actionscript, Flash, Flex, video Add commentsI’ve been looking at the Adobe Open Source Media Framework or OSMF today and I thought I’d post a little Flex quick-start project which should help people get up and running with it.
There’s a useful class in the adobe.strobe.players package which wraps up the Actionscript media player in a Flex UIcomponent. It’s called ‘MediaPlayerWrapper’ and it seems to be the only Flex based player supplied in the framework so far. This player isn’t a part of the official framework which is all contained within the org.openvideoplayer package. Instead it is offered as part of the examples that Adobe give to you in the download. It’s obviously meant as a base to work on because I have noticed a few bugs and omissions which brings me to this little example I’m posting.
The main thing I’ve noticed about the wrapper class is the absence of event metadata so I extended the class and added two. They are the ‘bufferingChange’ and ‘playheadChange’ events that are dispatched by the MediaPlayer class and re-dispatched by the wrapper. This allows you to listen for these events from within your flex tag like so …
-
<players:MediaPlayerWrapperExtension
-
-
id="wrapper"
-
width="100%"
-
height="100%"
-
-
playheadChange="{debugTxt.text='PLAYHEAD: '+wrapper.playhead}"
-
/>
In the code above the playheadChange event is available as a Flex event in my tag because of the metadata added to my class like so …
-
package com.lyraspace.video.players
-
{
-
import com.adobe.strobe.players.MediaPlayerWrapper;
-
-
[Event(name="bufferingChange", type="org.openvideoplayer.events.BufferingChangeEvent")]
-
[Event(name="playheadChange", type="org.openvideoplayer.events.PlayheadChangeEvent")]
-
public class MediaPlayerWrapperExtension extends MediaPlayerWrapper
-
{
-
public function MediaPlayerWrapperExtension()
-
{
-
super();
-
}
-
}
-
}
Here’s an example with the source.
Here’s the Application class. View-source to look at the wrapper class and the extension.
I’ve posted this quickly so anyone interested can get this working quickly but there’s a lot to be done with this wrapper. I need to add more metadata for a start and I need to take a good look at the binding.
More soon.


July 22nd, 2009 at 1:57 am
Great to see this working sample!
BTW, if you’d like to report any bugs, you can do so at
https://bugs.adobe.com/jira/browse/FM
Thank you for your interest in OSMF!
Vijay – OSMF team
July 22nd, 2009 at 7:59 am
Hi Vijay. Not sure if the ‘bug’ is with the MediaPlayer class as part of the framework or with the wrapper that is supplied as an example of the framework implementation. I’m going to have a look into it today. There’s definitely something up with the buffering though.
July 22nd, 2009 at 1:09 pm
Good example, the thing I think is good to improve is auto-setting of the initial volume (just to have better impression on the newbies) . Now video seems to start playing with the 100% volume disregarding the volume slider position.
July 22nd, 2009 at 1:44 pm
Ah yes … thanks for pointing that out. I have to stress that this was a very hastened wiring together of the Spark Video controls with the wrapper. I don’t think I even tested the volume. This does point out that there are indeed issues with binding that would need to be fixed.
July 22nd, 2009 at 1:47 pm
Just found a really great post about the framework here … http://elromdesign.com/blog/2009/07/21/getting-strarted-with-open-source-media-framework-osmf-formely-strobe/
July 22nd, 2009 at 4:48 pm
How could I install the framework???
July 22nd, 2009 at 5:22 pm
get the framework here … http://opensource.adobe.com/wiki/display/osmf/Open+Source+Media+Framework
you can also use svn : http://opensource.adobe.com/svn/opensource/osmf
I would check out from the repository and set up a Flex Library project to build your SWC. I imagine they’ll be updating the framework regularly and you’ll want to keep up to date.
July 22nd, 2009 at 8:35 pm
Thanks for your response but I Need Flex necessarily? or I can do just a project with Flash CS4
July 23rd, 2009 at 8:08 am
You can use Flash CS4 yes, it’s an Actionscript 3 framework so just download the code and reference it in your Flash project. There are no Flash components available specifically for the framework though … I imagine there will be v.soon. Also, the example above is for Flex. Seriously dude, let this be the example that gets you looking at Flex … you wont regret it.
July 23rd, 2009 at 8:08 am
Forgot to add … you’ll need to publish for FP10.
July 23rd, 2009 at 8:13 am
I think I need to be clear for people who are interested in this framework but new to working with them. The framework is just a bunch of code. Adobe have supplied some implementations of this code within examples for Flex (and I believe Flash) as part of the download. You’ll need to look in the samples folder to find what you are looking for. My example is a Flex project that references the framework in an SWC file which is just the code packaged up (like a ZIP) so you don’t need to have all the code sitting there confusing you.
July 30th, 2009 at 6:10 pm
A new post on this soon. I’m going to sort out that Flex wrapper once and for all!
July 31st, 2009 at 5:32 pm
Me again. If you have the latest Flex 4 SDK you may find that this example wont compile. There are numerous changes which I wont go into until I post a new example but one of the main ones is the change from VideoScrubBar to just ScrubBar. Why? Well it’s quite clever really … you can use the ScrubBar as the volume control too!