SlideShare a Scribd company logo
1 of 122
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
What is OSM Framework?
framework for creating
              Flash-based media
                 experiences



©2004-2010 R Blank                  4
Delivery Platform
Creation Tools




Delivery Platform
Content




Creation
Tools



Delivery
Platform
Content


 Code




Creation
Tools



Delivery
Platform
Content


 Code




 Application Framework


Creation
Tools



Delivery
Platform
Content


 Code




 Application Framework   Media Framework


Creation
Tools



Delivery
Platform
Content


 Code




 Application Framework   Media Framework


Creation
Tools



Delivery
Platform
Content


 Code




 Application Framework   Media Framework


Creation
Tools



Delivery
Platform
Benefits of a Framework




©2004-2010 R Blank            14
Benefits of a Framework




                     Accelerate




©2004-2010 R Blank                14
Benefits of a Framework




                      Accelerate
                     & Standardize




©2004-2010 R Blank                   14
Benefits of a Framework




                      Accelerate
                     & Standardize
                     Development



©2004-2010 R Blank                   14
media




©2004-2010 R Blank           15
Capabilities
©2004-2010 R Blank   19
Load




©2004-2010 R Blank          19
Load
                     Play




©2004-2010 R Blank          19
Load
                       Play
                     & Display




©2004-2010 R Blank               19
Load
                       Play
                     & Display
                      Media


©2004-2010 R Blank               19
Supported Media Types
   Streaming audio
        mp3, AAC, Speex, and Nellymoser
   Streaming video
        FLV, F4V, MP4, MPEG-4: MP4, M4V, F4V, 3GPP
   Progressive audio
        mp3
   Progressive video
        FLV, F4V, MP4, MP4V-ES, M4V, 3GPP, 3GPP2, QuickTime
   Images
        PNG, GIF, or JPG
   SWF files



©2004-2010 R Blank                                            20
EVERY Flash supported
                 media type




©2004-2010 R Blank                  21
Delivery

   Flash Player
     Quality of Service APIs (aka QoS)
     Digital Rights Management APIs (aka DRM)
     Server side
     HTTP Streaming (currently code-named Project
     Zeri)
   Flash Media Server
     Flash Media Manifest files (aka F4M)
     Digital Video Recorder functionality (aka DVR)



©2004-2010 R Blank                                    22
Existing Standards Support


   Video Ad Serving Template (VAST)
   Media Abstract Sequencing Template
   (MAST)
   Media RSS (MRSS)
   Distribution Format Exchange Profile
   (DFXP)
   Synchronized Multimedia Integration
   Language (SMIL)



©2004-2010 R Blank                        23
Plugins




   Developed by 3d Parties
   Or you!




©2004-2010 R Blank           24
Getting Started
Installing in Flash
adobe.com/go/osmf




©2004-2010 R Blank                       27
download 'source'
                in source folder, copy
                      OSMF.swc

               Direct Link (not to SVN, but to zips):
    http://opensource.adobe.com/wiki/display/osmf/Downloads




©2004-2010 R Blank                                            28
In Windows:
     Program FilesAdobeAdobe Flash CS4Common
     ConfigurationActionScript 3.0libs


   On the Macintosh:
    /Applications/Adobe Flash CS4/Common/
    Configuration/ActionScript 3.0/libs




©2004-2010 R Blank                                 29
The Simplest Possible
    OSMF Player
Basic Structure of an OSMF Player
Basic Structure of an OSMF Player




                  MediaElement
Any supported media type
 video
 images
 sound
 etc
Basic Structure of an OSMF Player




                  MediaElement
Any supported media type      or CompositeElement
 video                         Parallel or Serial
 images
 sound
 etc
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
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
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
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
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
imports




   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;




©2004-2010 R Blank                              32
the MediaContainer




   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;

      // Create the container class that displays the media.
   var container:MediaContainer = new MediaContainer();




©2004-2010 R Blank                                             33
the MediaContainer




   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;
   var container = new MediaContainer();

    //add the MediaContainer instance to the stage
   addChild(container);




©2004-2010 R Blank                                   34
the MediaPlayer



   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;
   var container = new MediaContainer();
   addChild(container);
   var videoElement=new VideoElement(new URLResource("my.flv"));

    //create the MediaPlayer instance
   var mediaPlayer:MediaPlayer = new MediaPlayer();




©2004-2010 R Blank                                                 35
the MediaPlayer
   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;
   var container = new MediaContainer();
   addChild(container);
   var videoElement=new VideoElement(new URLResource("my.flv"));
   container.addMediaElement(videoElement);
   var mediaPlayer = new MediaPlayer();

    // Set the MediaElement on the MediaPlayer.
    //Because autoPlay defaults to true, playback
    begins immediately
   mediaPlayer.media=videoElement;



©2004-2010 R Blank                                                 36
Simplest OSMF Video Player

   import org.osmf.containers.MediaContainer;
   import org.osmf.elements.VideoElement;
   import org.osmf.media.MediaPlayer;
   import org.osmf.media.URLResource;
   var container = new MediaContainer();
   addChild(container);
   var videoElement=new VideoElement(new
   URLResource("my.flv"));
   container.addMediaElement(videoElement);
   var mediaPlayer = new MediaPlayer();
   mediaPlayer.media=videoElement;




©2004-2010 R Blank                              37
Controlling Playback
Default Playback




    //set autoPlay to false on the MediaPlayer instance
    so that playback does not begin by default
   mediaPlayer.autoPlay=false;




©2004-2010 R Blank                                        39
//listen for the click event on the stage
   stage.addEventListener( MouseEvent.CLICK , _onClick );


   function _onClick( evt ):void {
         //if the MediaPlayer is playing
         if (mediaPlayer.playing) {
                //pause it
                mediaPlayer.pause( );
         } else {
                //resume it
                mediaPlayer.play( );
         }
   }



©2004-2010 R Blank                                          40
Using More Features
Media Factories
MediaFactory
MediaFactory
    Tell this to create
MediaElements, with a URL
MediaFactory
    Tell this to create
MediaElements, with a URL




    MediaElement
MediaFactory
    Tell this to create
MediaElements, with a URL




    MediaElement

      VideoElement
MediaFactory
                   Tell this to create
               MediaElements, with a URL




                   MediaElement

ImageElement         VideoElement
MediaFactory
                   Tell this to create
               MediaElements, with a URL




                   MediaElement

ImageElement         VideoElement          SoundElement
the Media Factory




   import org.osmf.media.DefaultMediaFactory;
    //create the DefaultMediaFactory instance
   var mediaFactory = new DefaultMediaFactory();
    //have the mediafactory create the VideoElement
   var
   mediaElement=mediaFactory.createMediaElement(ne
   w URLResource("my.flv"));




©2004-2010 R Blank                                    44
Layouts
MediaContainer




MediaElement
MediaContainer

LayoutMetadata




MediaElement
MediaContainer

LayoutMetadata


     Controls how a
MediaElement is displayed
 in the MediaContainer




  MediaElement
LayoutMetadata
width
height
x
y
...

can be absolute or relative
LayoutMetadata

      //create a LayoutMetadata object
   var layout = new LayoutMetadata();
      //set the width and height of the LayoutMetadata
      object
   layout.width=640;
   layout.height=480;
      //tie the LayoutMetadata instance to the
      MediaElement instance
   mediaElement.addMetadata(LayoutMetadata.LAYOUT_
   NAMESPACE, layout);




©2004-2010 R Blank                                       48
NetLoader
MediaElement
MediaElement
MediaElement



 NetLoader
HTTPStreamingNetLoader


RTMPDynamicStreamingNetLoader

DVRCastNetLoader
HTTPStreamingNetLoader


NetLoader   RTMPDynamicStreamingNetLoader

            DVRCastNetLoader
change
   var videoElement:VideoElement = new
   VideoElement( resource );



      to
   var videoElement:VideoElement = new
   VideoElement( resource , new
   RTMPDynamicStreamingNetLoader ( ) );




©2004-2010 R Blank                        52
MediaElement
MediaElement

URLResource
  "some.flv"
MediaElement

      DynamicStreamingResource
Vector.<DynamicStreamingResourceItem>




low             medium            high
//create a new DynamicStreamingResource
    pointing to our FMS application
   var resource : DynamicStreamingResource = new
   DynamicStreamingResource ( RMTP_URL ) ;




©2004-2010 R Blank                                 55
//create a Vector to store the
    DynamicStreaminingItem objects
   var vector : Vector.<DynamicStreamingItem> =
   new Vector.<DynamicStreamingItem> ( 3 ) ;




©2004-2010 R Blank                                56
//create 3 entries in the vector, each a
    DynamicStreamingItem, with a file name and a
    minimum bitrate
   vector [ 0 ] = new DynamicStreamingItem
   ( "2012_high" , 1500 ) ;
   vector [ 1 ] = new DynamicStreamingItem
   ( "2012_low" , 400 ) ;
   vector [ 2 ] = new DynamicStreamingItem
   ( "2012_medium" , 600 ) ;




©2004-2010 R Blank                                 57
//set the streamItems property on the
    DynamicStreamingResource to our vector
   resource.streamItems = vector ;
    //create a new VideoElement, based on the
    resource
   var videoElement = new VideoElement( resource ) ;




©2004-2010 R Blank                                     58
Dynamic Streaming in a few lines....




   var resource = new DynamicStreamingResource ( RMTP_URL ) ;
   var vector = new Vector.<DynamicStreamingItem> ( 3 ) ;
   vector [ 0 ] = new DynamicStreamingItem ( "2012_high" , 1500 ) ;
   vector [ 1 ] = new DynamicStreamingItem ( "2012_low" , 400 ) ;
   vector [ 2 ] = new DynamicStreamingItem ( "2012_medium" , 600 ) ;
   resource.streamItems = vector ;
   var videoElement = new VideoElement( resource ) ;




©2004-2010 R Blank                                                     59
Composite Elements
ParallelElement
ParallelElement

MediaElement    MediaElement
ParallelElement

MediaElement     MediaElement




         concurrently
SerialElement

MediaElement      MediaElement




         consecutively
Basic Structure of an OSMF Player
       with CompositeElements
              Playback


           MediaPlayer

       CompositeElement

MediaElement         MediaElement
Basic Structure of an OSMF Player
        with CompositeElements
                Display


         MediaContainer




MediaElement           MediaElement
Basic Structure of an OSMF Player
         with CompositeElements
                 Display


          MediaContainer

LayoutMetadata

MediaElement            MediaElement
Basic Structure of an OSMF Player
         with CompositeElements
                 Display


          MediaContainer

LayoutMetadata         LayoutMetadata

MediaElement            MediaElement
create 2 MediaElements




      //use the mediaFactory to create two new MediaElement
      objects
   var mediaElement1=mediaFactory.createMediaElement(new
   URLResource(MEDIA_URL));
   var mediaElement2=mediaFactory.createMediaElement(new
   URLResource(MEDIA_URL2));




©2004-2010 R Blank                                            65
Use two layouts for the container
      //create, size and position two LayoutMetadata objects
   var layout1 = new LayoutMetadata();
   layout1.width=320;
   layout1.height=240;
   var layout2 = new LayoutMetadata();
   layout2.width=320;
   layout2.height=240;
      //tie each LayoutMetadata object to one of the MediaElement
      objects
   mediaElement1.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE
   , layout1);
   mediaElement2.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE
   , layout2);




©2004-2010 R Blank                                                  66
the SerialElement


      //create a new SerialElement
   var serialElement = new SerialElement ( );
      //add both MediaElement instances to the serialElement
   serialElement.addChild( mediaElement1 );
   serialElement.addChild( mediaElement2 );
      //set the media property of the mediaPlayer to the
      parallelElement
   mediaPlayer.media= serialElement;
      //add the parallelElement to the MediaContainer
   mediaContainer.addMediaElement(serialElement);



©2004-2010 R Blank                                             67
Subclipping
//create a resource pointing to MEDIA_URL1 from 0 seconds to 10
      seconds
   var resource1=new StreamingURLResource(MEDIA_URL1,null,0,10);
      //add resource1 to the serialElement
   serialElement.addChild( new VideoElement( resource1 ) );
      //create a (regular) resource pointing to (the whole) AD
   serialElement.addChild( new VideoElement( new
   URLResource( AD ) ) );
      //create a resource pointing to MEDIA_URL1 from 20 seconds to 30
      seconds
   var resource2=new StreamingURLResource(MEDIA_URL2,null,20,30);




©2004-2010 R Blank                                                       69
Full Basic Player
MediaPlayer Properties




©2004-2010 R Blank           71
MediaPlayer Properties




                     duration




©2004-2010 R Blank              71
MediaPlayer Properties




                     duration
                       time




©2004-2010 R Blank              71
MediaPlayer Properties




                     duration
                       time
                     autoPlay




©2004-2010 R Blank              71
MediaPlayer Properties




                      duration
                        time
                      autoPlay
                     autoRewind


©2004-2010 R Blank                71
Media Player Events




   TimeEvent.CURRENT_TIME_CHANGE




©2004-2010 R Blank                 72
_mediaPlayer.addEventListener
   ( TimeEvent.CURRENT_TIME_CHANGE , _onCurrentTimeChange ) ;


   function _onCurrentTimeChange ( evt : TimeEvent ) : void
   {
         trace ( "_onCurrentTimeChange () , evt.time : " + evt.time ) ;
   }




©2004-2010 R Blank                                                        73
Media Player Events




    MediaPlayerCapabilityChangeEvent.
           CAN_LOAD_CHANGE




©2004-2010 R Blank                      74
_mediaPlayer.addEventListener
   ( MediaPlayerCapabilityChangeEvent.CAN_LOAD_CHANGE ,
   _onCanLoadChange ) ;


   function _onCanLoadChange ( evt :
   MediaPlayerCapabilityChangeEvent ) : void
   {
         trace ( "_onCanLoadChange () , evt.enabled : " + evt.enabled ) ;
   }




©2004-2010 R Blank                                                          75
Media Player Events




    MediaPlayerCapabilityChangeEvent.
           CAN_PLAY_CHANGE




©2004-2010 R Blank                      76
_mediaPlayer.addEventListener
   ( MediaPlayerCapabilityChangeEvent.CAN_PLAY_CHANGE ,
   _onCanPlayChange ) ;


   function _onCanPlayChange ( evt :
   MediaPlayerCapabilityChangeEvent ) : void
   {
         trace ( "_onCanPlayChange () , evt.enabled : " + evt.enabled ) ;
   }




©2004-2010 R Blank                                                          77
Media Player Events




    MediaPlayerCapabilityChangeEvent.
           CAN_SEEK_CHANGE




©2004-2010 R Blank                      78
_mediaPlayer.addEventListener
   ( MediaPlayerCapabilityChangeEvent.CAN_SEEK_CHANGE ,
   _onCanSeekChange ) ;


   function _onCanSeekChange ( evt :
   MediaPlayerCapabilityChangeEvent ) : void
   {
         trace ( "_onCanSeekChange () , evt.enabled : " + evt.enabled ) ;
   }




©2004-2010 R Blank                                                          79
Media Player Events




           MediaErrorEvent.MEDIA_ERROR




©2004-2010 R Blank                       80
_mediaPlayer.addEventListener ( MediaErrorEvent.MEDIA_ERROR ,
   _onMediaError ) ;


   function _onMediaError ( evt : MediaErrorEvent ) : void
   {
         trace ( "_onMediaError () , evt.error : " + evt.error ) ;
   }




©2004-2010 R Blank                                                   81
Media Player Events




   MediaPlayerStateChangeEvent.
   MEDIA_PLAYER_STATE_CHANGE




©2004-2010 R Blank                82
_mediaPlayer.addEventListener
   ( MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE ,
   _onMediaPlayerStateChange ) ;


   function _onMediaPlayerStateChange ( evt :
   MediaPlayerStateChangeEvent ) : void
   {
       trace ( "_onMediaPlayerStateChange () , evt.state : " +
   evt.state ) ;
   }




©2004-2010 R Blank                                               83
MediaPlayer State Values




   playing
   loading
   buffering
   uninitialized
   ready




©2004-2010 R Blank             84
Next Steps

adobe.com/go/osmf
read the docs




©2004-2010 R Blank                   86
check sample files




©2004-2010 R Blank                        87
start working with it




©2004-2010 R Blank                           88
Thank You

   Training:   richmediainstitute.com
   Production: almerblank.com
   Blog:       rblank.com




©2004-2010 R Blank                      89

More Related Content

Similar to Standardize Your Flash with Adobe OSMF (0.9)

2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 videoMediaMosa
 
Adobe Max 2009 - Learnings
Adobe Max 2009 -  LearningsAdobe Max 2009 -  Learnings
Adobe Max 2009 - Learningsziblu
 
MacVide FlashVideo Converter UserGuide
MacVide FlashVideo Converter UserGuideMacVide FlashVideo Converter UserGuide
MacVide FlashVideo Converter UserGuideMacVide
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Joseph Labrecque
 
WordcampNYC 2010 - Wordpress & Multimedia (Updated)
WordcampNYC 2010 - Wordpress & Multimedia (Updated)WordcampNYC 2010 - Wordpress & Multimedia (Updated)
WordcampNYC 2010 - Wordpress & Multimedia (Updated)Digital Strategy Works LLC
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingbrucelawson
 
Export a Video With Your Own Logo
Export a Video With Your Own LogoExport a Video With Your Own Logo
Export a Video With Your Own Logoaudio4fun
 
Flash Professional CC: The Future of Animation
 Flash Professional CC: The Future of Animation Flash Professional CC: The Future of Animation
Flash Professional CC: The Future of AnimationFITC
 
Working with Video and Audio
Working with Video and AudioWorking with Video and Audio
Working with Video and AudioNicole Ryan
 
dat-Post-Producer-final
dat-Post-Producer-finaldat-Post-Producer-final
dat-Post-Producer-finalScott Matics
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Designtclanton4
 
Easy Steps to Mastering OpenShot Video Editor.pptx
Easy Steps to Mastering OpenShot Video Editor.pptxEasy Steps to Mastering OpenShot Video Editor.pptx
Easy Steps to Mastering OpenShot Video Editor.pptxkuldeep Birwal
 
adobe premiere pro.ppt
adobe premiere pro.pptadobe premiere pro.ppt
adobe premiere pro.pptVeronicGomez
 
Top Screen Capture Tool for PC
Top Screen Capture Tool for PCTop Screen Capture Tool for PC
Top Screen Capture Tool for PCProtect and Access
 
Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Andy Hall
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)Jesse (Chien Chen) Chen
 
Video editing presentation
Video editing presentationVideo editing presentation
Video editing presentationTANZICT
 

Similar to Standardize Your Flash with Adobe OSMF (0.9) (20)

2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video2011 06-20 - drupal jam - html5 video
2011 06-20 - drupal jam - html5 video
 
Adobe Max 2009 - Learnings
Adobe Max 2009 -  LearningsAdobe Max 2009 -  Learnings
Adobe Max 2009 - Learnings
 
MacVide FlashVideo Converter UserGuide
MacVide FlashVideo Converter UserGuideMacVide FlashVideo Converter UserGuide
MacVide FlashVideo Converter UserGuide
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.
 
WordcampNYC 2010 - Wordpress & Multimedia (Updated)
WordcampNYC 2010 - Wordpress & Multimedia (Updated)WordcampNYC 2010 - Wordpress & Multimedia (Updated)
WordcampNYC 2010 - Wordpress & Multimedia (Updated)
 
HTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're goingHTML5 multimedia - where we are, where we're going
HTML5 multimedia - where we are, where we're going
 
Export a Video With Your Own Logo
Export a Video With Your Own LogoExport a Video With Your Own Logo
Export a Video With Your Own Logo
 
Flash Professional CC: The Future of Animation
 Flash Professional CC: The Future of Animation Flash Professional CC: The Future of Animation
Flash Professional CC: The Future of Animation
 
Working with Video and Audio
Working with Video and AudioWorking with Video and Audio
Working with Video and Audio
 
dat-Post-Producer-final
dat-Post-Producer-finaldat-Post-Producer-final
dat-Post-Producer-final
 
Last videoppt
Last videopptLast videoppt
Last videoppt
 
Chapter 11 - Web Design
Chapter 11 - Web DesignChapter 11 - Web Design
Chapter 11 - Web Design
 
Easy Steps to Mastering OpenShot Video Editor.pptx
Easy Steps to Mastering OpenShot Video Editor.pptxEasy Steps to Mastering OpenShot Video Editor.pptx
Easy Steps to Mastering OpenShot Video Editor.pptx
 
adobe premiere pro.ppt
adobe premiere pro.pptadobe premiere pro.ppt
adobe premiere pro.ppt
 
Top Screen Capture Tool for PC
Top Screen Capture Tool for PCTop Screen Capture Tool for PC
Top Screen Capture Tool for PC
 
Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業Flash/AIRの最新情報及びARMとの協業
Flash/AIRの最新情報及びARMとの協業
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)
 
test
testtest
test
 
Video editing presentation
Video editing presentationVideo editing presentation
Video editing presentation
 
BDPA Open Source 2012
BDPA  Open Source  2012BDPA  Open Source  2012
BDPA Open Source 2012
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 

Standardize Your Flash with Adobe OSMF (0.9)

  • 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
  • 2.
  • 3. What is OSM Framework?
  • 4. framework for creating Flash-based media experiences ©2004-2010 R Blank 4
  • 9. Content Code Application Framework Creation Tools Delivery Platform
  • 10. Content Code Application Framework Media Framework Creation Tools Delivery Platform
  • 11. Content Code Application Framework Media Framework Creation Tools Delivery Platform
  • 12. Content Code Application Framework Media Framework Creation Tools Delivery Platform
  • 13.
  • 14. Benefits of a Framework ©2004-2010 R Blank 14
  • 15. Benefits of a Framework Accelerate ©2004-2010 R Blank 14
  • 16. Benefits of a Framework Accelerate & Standardize ©2004-2010 R Blank 14
  • 17. Benefits of a Framework Accelerate & Standardize Development ©2004-2010 R Blank 14
  • 19.
  • 20.
  • 24. Load Play ©2004-2010 R Blank 19
  • 25. Load Play & Display ©2004-2010 R Blank 19
  • 26. Load Play & Display Media ©2004-2010 R Blank 19
  • 27. Supported Media Types Streaming audio mp3, AAC, Speex, and Nellymoser Streaming video FLV, F4V, MP4, MPEG-4: MP4, M4V, F4V, 3GPP Progressive audio mp3 Progressive video FLV, F4V, MP4, MP4V-ES, M4V, 3GPP, 3GPP2, QuickTime Images PNG, GIF, or JPG SWF files ©2004-2010 R Blank 20
  • 28. EVERY Flash supported media type ©2004-2010 R Blank 21
  • 29. Delivery Flash Player Quality of Service APIs (aka QoS) Digital Rights Management APIs (aka DRM) Server side HTTP Streaming (currently code-named Project Zeri) Flash Media Server Flash Media Manifest files (aka F4M) Digital Video Recorder functionality (aka DVR) ©2004-2010 R Blank 22
  • 30. Existing Standards Support Video Ad Serving Template (VAST) Media Abstract Sequencing Template (MAST) Media RSS (MRSS) Distribution Format Exchange Profile (DFXP) Synchronized Multimedia Integration Language (SMIL) ©2004-2010 R Blank 23
  • 31. Plugins Developed by 3d Parties Or you! ©2004-2010 R Blank 24
  • 35. download 'source' in source folder, copy OSMF.swc Direct Link (not to SVN, but to zips): http://opensource.adobe.com/wiki/display/osmf/Downloads ©2004-2010 R Blank 28
  • 36. In Windows: Program FilesAdobeAdobe Flash CS4Common ConfigurationActionScript 3.0libs On the Macintosh: /Applications/Adobe Flash CS4/Common/ Configuration/ActionScript 3.0/libs ©2004-2010 R Blank 29
  • 37. The Simplest Possible OSMF Player
  • 38. Basic Structure of an OSMF Player
  • 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
  • 46. imports import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; ©2004-2010 R Blank 32
  • 47. the MediaContainer import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; // Create the container class that displays the media. var container:MediaContainer = new MediaContainer(); ©2004-2010 R Blank 33
  • 48. the MediaContainer import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; var container = new MediaContainer(); //add the MediaContainer instance to the stage addChild(container); ©2004-2010 R Blank 34
  • 49. the MediaPlayer import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; var container = new MediaContainer(); addChild(container); var videoElement=new VideoElement(new URLResource("my.flv")); //create the MediaPlayer instance var mediaPlayer:MediaPlayer = new MediaPlayer(); ©2004-2010 R Blank 35
  • 50. the MediaPlayer import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; var container = new MediaContainer(); addChild(container); var videoElement=new VideoElement(new URLResource("my.flv")); container.addMediaElement(videoElement); var mediaPlayer = new MediaPlayer(); // Set the MediaElement on the MediaPlayer. //Because autoPlay defaults to true, playback begins immediately mediaPlayer.media=videoElement; ©2004-2010 R Blank 36
  • 51. Simplest OSMF Video Player import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; var container = new MediaContainer(); addChild(container); var videoElement=new VideoElement(new URLResource("my.flv")); container.addMediaElement(videoElement); var mediaPlayer = new MediaPlayer(); mediaPlayer.media=videoElement; ©2004-2010 R Blank 37
  • 53. Default Playback //set autoPlay to false on the MediaPlayer instance so that playback does not begin by default mediaPlayer.autoPlay=false; ©2004-2010 R Blank 39
  • 54. //listen for the click event on the stage stage.addEventListener( MouseEvent.CLICK , _onClick ); function _onClick( evt ):void { //if the MediaPlayer is playing if (mediaPlayer.playing) { //pause it mediaPlayer.pause( ); } else { //resume it mediaPlayer.play( ); } } ©2004-2010 R Blank 40
  • 58. MediaFactory Tell this to create MediaElements, with a URL
  • 59. MediaFactory Tell this to create MediaElements, with a URL MediaElement
  • 60. MediaFactory Tell this to create MediaElements, with a URL MediaElement VideoElement
  • 61. MediaFactory Tell this to create MediaElements, with a URL MediaElement ImageElement VideoElement
  • 62. MediaFactory Tell this to create MediaElements, with a URL MediaElement ImageElement VideoElement SoundElement
  • 63. the Media Factory import org.osmf.media.DefaultMediaFactory; //create the DefaultMediaFactory instance var mediaFactory = new DefaultMediaFactory(); //have the mediafactory create the VideoElement var mediaElement=mediaFactory.createMediaElement(ne w URLResource("my.flv")); ©2004-2010 R Blank 44
  • 67. MediaContainer LayoutMetadata Controls how a MediaElement is displayed in the MediaContainer MediaElement
  • 69. LayoutMetadata //create a LayoutMetadata object var layout = new LayoutMetadata(); //set the width and height of the LayoutMetadata object layout.width=640; layout.height=480; //tie the LayoutMetadata instance to the MediaElement instance mediaElement.addMetadata(LayoutMetadata.LAYOUT_ NAMESPACE, layout); ©2004-2010 R Blank 48
  • 75. HTTPStreamingNetLoader NetLoader RTMPDynamicStreamingNetLoader DVRCastNetLoader
  • 76. change var videoElement:VideoElement = new VideoElement( resource ); to var videoElement:VideoElement = new VideoElement( resource , new RTMPDynamicStreamingNetLoader ( ) ); ©2004-2010 R Blank 52
  • 79. MediaElement DynamicStreamingResource Vector.<DynamicStreamingResourceItem> low medium high
  • 80. //create a new DynamicStreamingResource pointing to our FMS application var resource : DynamicStreamingResource = new DynamicStreamingResource ( RMTP_URL ) ; ©2004-2010 R Blank 55
  • 81. //create a Vector to store the DynamicStreaminingItem objects var vector : Vector.<DynamicStreamingItem> = new Vector.<DynamicStreamingItem> ( 3 ) ; ©2004-2010 R Blank 56
  • 82. //create 3 entries in the vector, each a DynamicStreamingItem, with a file name and a minimum bitrate vector [ 0 ] = new DynamicStreamingItem ( "2012_high" , 1500 ) ; vector [ 1 ] = new DynamicStreamingItem ( "2012_low" , 400 ) ; vector [ 2 ] = new DynamicStreamingItem ( "2012_medium" , 600 ) ; ©2004-2010 R Blank 57
  • 83. //set the streamItems property on the DynamicStreamingResource to our vector resource.streamItems = vector ; //create a new VideoElement, based on the resource var videoElement = new VideoElement( resource ) ; ©2004-2010 R Blank 58
  • 84. Dynamic Streaming in a few lines.... var resource = new DynamicStreamingResource ( RMTP_URL ) ; var vector = new Vector.<DynamicStreamingItem> ( 3 ) ; vector [ 0 ] = new DynamicStreamingItem ( "2012_high" , 1500 ) ; vector [ 1 ] = new DynamicStreamingItem ( "2012_low" , 400 ) ; vector [ 2 ] = new DynamicStreamingItem ( "2012_medium" , 600 ) ; resource.streamItems = vector ; var videoElement = new VideoElement( resource ) ; ©2004-2010 R Blank 59
  • 88. ParallelElement MediaElement MediaElement concurrently
  • 89. SerialElement MediaElement MediaElement consecutively
  • 90. Basic Structure of an OSMF Player with CompositeElements Playback MediaPlayer CompositeElement MediaElement MediaElement
  • 91. Basic Structure of an OSMF Player with CompositeElements Display MediaContainer MediaElement MediaElement
  • 92. Basic Structure of an OSMF Player with CompositeElements Display MediaContainer LayoutMetadata MediaElement MediaElement
  • 93. Basic Structure of an OSMF Player with CompositeElements Display MediaContainer LayoutMetadata LayoutMetadata MediaElement MediaElement
  • 94. create 2 MediaElements //use the mediaFactory to create two new MediaElement objects var mediaElement1=mediaFactory.createMediaElement(new URLResource(MEDIA_URL)); var mediaElement2=mediaFactory.createMediaElement(new URLResource(MEDIA_URL2)); ©2004-2010 R Blank 65
  • 95. Use two layouts for the container //create, size and position two LayoutMetadata objects var layout1 = new LayoutMetadata(); layout1.width=320; layout1.height=240; var layout2 = new LayoutMetadata(); layout2.width=320; layout2.height=240; //tie each LayoutMetadata object to one of the MediaElement objects mediaElement1.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE , layout1); mediaElement2.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE , layout2); ©2004-2010 R Blank 66
  • 96. the SerialElement //create a new SerialElement var serialElement = new SerialElement ( ); //add both MediaElement instances to the serialElement serialElement.addChild( mediaElement1 ); serialElement.addChild( mediaElement2 ); //set the media property of the mediaPlayer to the parallelElement mediaPlayer.media= serialElement; //add the parallelElement to the MediaContainer mediaContainer.addMediaElement(serialElement); ©2004-2010 R Blank 67
  • 98. //create a resource pointing to MEDIA_URL1 from 0 seconds to 10 seconds var resource1=new StreamingURLResource(MEDIA_URL1,null,0,10); //add resource1 to the serialElement serialElement.addChild( new VideoElement( resource1 ) ); //create a (regular) resource pointing to (the whole) AD serialElement.addChild( new VideoElement( new URLResource( AD ) ) ); //create a resource pointing to MEDIA_URL1 from 20 seconds to 30 seconds var resource2=new StreamingURLResource(MEDIA_URL2,null,20,30); ©2004-2010 R Blank 69
  • 101. MediaPlayer Properties duration ©2004-2010 R Blank 71
  • 102. MediaPlayer Properties duration time ©2004-2010 R Blank 71
  • 103. MediaPlayer Properties duration time autoPlay ©2004-2010 R Blank 71
  • 104. MediaPlayer Properties duration time autoPlay autoRewind ©2004-2010 R Blank 71
  • 105. Media Player Events TimeEvent.CURRENT_TIME_CHANGE ©2004-2010 R Blank 72
  • 106. _mediaPlayer.addEventListener ( TimeEvent.CURRENT_TIME_CHANGE , _onCurrentTimeChange ) ; function _onCurrentTimeChange ( evt : TimeEvent ) : void { trace ( "_onCurrentTimeChange () , evt.time : " + evt.time ) ; } ©2004-2010 R Blank 73
  • 107. Media Player Events MediaPlayerCapabilityChangeEvent. CAN_LOAD_CHANGE ©2004-2010 R Blank 74
  • 108. _mediaPlayer.addEventListener ( MediaPlayerCapabilityChangeEvent.CAN_LOAD_CHANGE , _onCanLoadChange ) ; function _onCanLoadChange ( evt : MediaPlayerCapabilityChangeEvent ) : void { trace ( "_onCanLoadChange () , evt.enabled : " + evt.enabled ) ; } ©2004-2010 R Blank 75
  • 109. Media Player Events MediaPlayerCapabilityChangeEvent. CAN_PLAY_CHANGE ©2004-2010 R Blank 76
  • 110. _mediaPlayer.addEventListener ( MediaPlayerCapabilityChangeEvent.CAN_PLAY_CHANGE , _onCanPlayChange ) ; function _onCanPlayChange ( evt : MediaPlayerCapabilityChangeEvent ) : void { trace ( "_onCanPlayChange () , evt.enabled : " + evt.enabled ) ; } ©2004-2010 R Blank 77
  • 111. Media Player Events MediaPlayerCapabilityChangeEvent. CAN_SEEK_CHANGE ©2004-2010 R Blank 78
  • 112. _mediaPlayer.addEventListener ( MediaPlayerCapabilityChangeEvent.CAN_SEEK_CHANGE , _onCanSeekChange ) ; function _onCanSeekChange ( evt : MediaPlayerCapabilityChangeEvent ) : void { trace ( "_onCanSeekChange () , evt.enabled : " + evt.enabled ) ; } ©2004-2010 R Blank 79
  • 113. Media Player Events MediaErrorEvent.MEDIA_ERROR ©2004-2010 R Blank 80
  • 114. _mediaPlayer.addEventListener ( MediaErrorEvent.MEDIA_ERROR , _onMediaError ) ; function _onMediaError ( evt : MediaErrorEvent ) : void { trace ( "_onMediaError () , evt.error : " + evt.error ) ; } ©2004-2010 R Blank 81
  • 115. Media Player Events MediaPlayerStateChangeEvent. MEDIA_PLAYER_STATE_CHANGE ©2004-2010 R Blank 82
  • 116. _mediaPlayer.addEventListener ( MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE , _onMediaPlayerStateChange ) ; function _onMediaPlayerStateChange ( evt : MediaPlayerStateChangeEvent ) : void { trace ( "_onMediaPlayerStateChange () , evt.state : " + evt.state ) ; } ©2004-2010 R Blank 83
  • 117. MediaPlayer State Values playing loading buffering uninitialized ready ©2004-2010 R Blank 84
  • 121. start working with it ©2004-2010 R Blank 88
  • 122. Thank You Training: richmediainstitute.com Production: almerblank.com Blog: rblank.com ©2004-2010 R Blank 89

Editor's Notes

  1. download slides and all code @ rblank.com shortly after this talk
  2. about me ...&gt;
  3. ...well what does that mean?
  4. a framework - a bunch of code you can use out of the box why?
  5. ...what type of development?
  6. ...what type of development?
  7. ...what type of development?
  8. 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&apos;s specifically built to be flexible in that way
  9. 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
  10. so just as the Flex Framework has helped standardize and accelerate the production of what we call RIAs, that&apos;s what OSMF is to media -- an ActionScript 3 framework to standardize the creation of media delivery experiences on the Flash Platform it&apos;s still in beta, but at Sprint 10, v0.93, much of the API has now been locked down, so it&apos;s gonna be a lot more fun to play and work with it no GUI components -- yet but nothing&apos;s stopping you!
  11. 1) RSS media reader 2) closed captioning 3) akamai CDN integration
  12. download
  13. the source includes a ton of files -- go straight to this one also download the ASDocs for helpful reference, but those aren&apos;t required to work with it
  14. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  15. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  16. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  17. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  18. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  19. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  20. media player can contain one MediaElement at a time mediacontainers can multiple MediaElements at a time
  21. if you&apos;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
  22. 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...&gt;
  23. use of mediafactory is optional each specific type of media element has specific traits but if you use a mediafactory, you don&apos;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&apos;m not covering today) requires using the mediafactory, precisely because it&apos;s agnostic on the specific type of MediaElement
  24. use of mediafactory is optional each specific type of media element has specific traits but if you use a mediafactory, you don&apos;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&apos;m not covering today) requires using the mediafactory, precisely because it&apos;s agnostic on the specific type of MediaElement
  25. use of mediafactory is optional each specific type of media element has specific traits but if you use a mediafactory, you don&apos;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&apos;m not covering today) requires using the mediafactory, precisely because it&apos;s agnostic on the specific type of MediaElement
  26. use of mediafactory is optional each specific type of media element has specific traits but if you use a mediafactory, you don&apos;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&apos;m not covering today) requires using the mediafactory, precisely because it&apos;s agnostic on the specific type of MediaElement
  27. use of mediafactory is optional each specific type of media element has specific traits but if you use a mediafactory, you don&apos;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&apos;m not covering today) requires using the mediafactory, precisely because it&apos;s agnostic on the specific type of MediaElement
  28. 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&apos;t, the MediaFactory will create the right one for you the plain vanilla NetLoader is useful in most cases...&gt;
  29. 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&apos;t, the MediaFactory will create the right one for you the plain vanilla NetLoader is useful in most cases...&gt;
  30. but the netloader has three inheritors which give us some fun powers right away http streaming...&gt;
  31. ... a more traditional type of streaming is RTMP you&apos;ve seen how easy it is to do streaming with OSMF -- it&apos;s the same exact code as progressive OSMF also makes dynamic streaming really easy
  32. you don&apos;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
  33. compositeelements do not factor into the display at all technically layout metadata is optional, but almost certainly required when using parallelelements
  34. compositeelements do not factor into the display at all technically layout metadata is optional, but almost certainly required when using parallelelements
  35. it&apos;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&apos;re probably going to want to know a few properties and a few events on the MediaPlayer
  36. read the tutorials and check the sample code there&apos;s a fair bit on Adobe Dev Center (linked from osmf page) also, there&apos;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