The document discusses the OSMF (Open Source Media Framework) framework for creating Flash-based media experiences. It describes the basic structure of an OSMF player including the MediaPlayer, MediaElement, and MediaContainer classes. It covers loading and playing media, controlling playback, using media factories, layouts, composite elements, and subclipping. The full code example shows how to create a basic OSMF video player.
1. Standardize Your Flash with
presented by R Blank
Training Director | Rich Media Institute
The Rich Media Institute | For other courses and much more visit: www.richmediainstitute.com
39. Basic Structure of an OSMF Player
MediaElement
Any supported media type
video
images
sound
etc
40. Basic Structure of an OSMF Player
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound
etc
41. Basic Structure of an OSMF Player
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound Tell this to load stuff
etc
42. Basic Structure of an OSMF Player
MediaPlayer
Control playback of a
MediaElement
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound Tell this to load stuff
etc
43. Basic Structure of an OSMF Player
MediaPlayer
Control playback of a
MediaElement
Tell this to play, stop, etc
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound Tell this to load stuff
etc
44. Basic Structure of an OSMF Player
MediaPlayer MediaContainer
Control playback of a Display MediaElement(s)
MediaElement on the Stage
Tell this to play, stop, etc
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound Tell this to load stuff
etc
45. Basic Structure of an OSMF Player
MediaPlayer MediaContainer
Control playback of a Display MediaElement(s)
MediaElement on the Stage
Add this to stage, tell it
Tell this to play, stop, etc
what element(s) to show
MediaElement
Any supported media type or CompositeElement
video Parallel or Serial
images
sound Tell this to load stuff
etc
download slides and all code @ rblank.com shortly after this talk
about me ...>
...well what does that mean?
a framework - a bunch of code you can use out of the box
why?
...what type of development?
...what type of development?
...what type of development?
but where it will likely have the most immediate impact is video
for reasons I will shortly explain
but I want to reiterate how OSMF is for all media -- it's specifically built to be flexible in that way
as I said, video is where OSMF will have the most immediate impact
so much of web video is now Flash video
so many sites have video players
each video player is frustratingly unique
not just playback controls
but how the player works (e.g., when resized in different forms or in full-screen mode), how ads work, how metrics are tracked
this:
slows down developers/engineers
increases production costs for content distributors
confuses users (with different standards, interactions and controls)
implementing a standard framework for the creation of these media-rich Flash Platform experiences has a lot of potential benefit for the entire world of digital content
so just as the Flex Framework has helped standardize and accelerate the production of what we call RIAs, that's what OSMF is to media -- an ActionScript 3 framework to standardize the creation of media delivery experiences on the Flash Platform
it's still in beta, but at Sprint 10, v0.93, much of the API has now been locked down, so it's gonna be a lot more fun to play and work with it
no GUI components -- yet
but nothing's stopping you!
the source includes a ton of files -- go straight to this one
also download the ASDocs for helpful reference, but those aren't required to work with it
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
media player can contain one MediaElement at a time
mediacontainers can multiple MediaElements at a time
if you're used to coding on the timeline, you might not be used to using imports
since OSMF is a framework that is not part of the Flash Player, you have to import all of the OSMF classes you work with
6 lines of code
and the same code works to stream video
...now that we have these basics in place, we can do a bit more...>
use of mediafactory is optional
each specific type of media element has specific traits
but if you use a mediafactory, you don't need to care about what specific type of MediaElement
you require -- Flash will choose it for you automatically based on the media type
use of plugins (which I'm not covering today) requires using the mediafactory, precisely because it's agnostic on the specific type of MediaElement
use of mediafactory is optional
each specific type of media element has specific traits
but if you use a mediafactory, you don't need to care about what specific type of MediaElement
you require -- Flash will choose it for you automatically based on the media type
use of plugins (which I'm not covering today) requires using the mediafactory, precisely because it's agnostic on the specific type of MediaElement
use of mediafactory is optional
each specific type of media element has specific traits
but if you use a mediafactory, you don't need to care about what specific type of MediaElement
you require -- Flash will choose it for you automatically based on the media type
use of plugins (which I'm not covering today) requires using the mediafactory, precisely because it's agnostic on the specific type of MediaElement
use of mediafactory is optional
each specific type of media element has specific traits
but if you use a mediafactory, you don't need to care about what specific type of MediaElement
you require -- Flash will choose it for you automatically based on the media type
use of plugins (which I'm not covering today) requires using the mediafactory, precisely because it's agnostic on the specific type of MediaElement
use of mediafactory is optional
each specific type of media element has specific traits
but if you use a mediafactory, you don't need to care about what specific type of MediaElement
you require -- Flash will choose it for you automatically based on the media type
use of plugins (which I'm not covering today) requires using the mediafactory, precisely because it's agnostic on the specific type of MediaElement
mediaelements load media
they do this using something called a NetLoader
when you create a mediaelement (either directly, or through a mediafactory) you have the option of passing in a type of NetLoader
if you don't, the MediaFactory will create the right one for you
the plain vanilla NetLoader is useful in most cases...>
mediaelements load media
they do this using something called a NetLoader
when you create a mediaelement (either directly, or through a mediafactory) you have the option of passing in a type of NetLoader
if you don't, the MediaFactory will create the right one for you
the plain vanilla NetLoader is useful in most cases...>
but the netloader has three inheritors
which give us some fun powers right away
http streaming...>
... a more traditional type of streaming is RTMP
you've seen how easy it is to do streaming with OSMF -- it's the same exact code as progressive
OSMF also makes dynamic streaming really easy
you don't generally create a CompositeElement directly
you create one of two types of CompositeElements
for playback management only -- not display
still a one-to-one for mediaelements to the mediacontainer
compositeelements do not factor into the display at all
technically layout metadata is optional, but almost certainly required when using parallelelements
compositeelements do not factor into the display at all
technically layout metadata is optional, but almost certainly required when using parallelelements
it's in the source files for this talk
in order to start building any apps that work with OSMF, there just a few key items you're probably going to want to know
a few properties and a few events on the MediaPlayer
read the tutorials and check the sample code
there's a fair bit on Adobe Dev Center (linked from osmf page)
also, there's a virtual Adobe User Group for OSMF, find out about it at osmf site
google for other tutorials and blog posts -- which are becoming more plentiful