Skip navigation
Currently Being Moderated

OSMF with Flex examples

Aug 10, 2010 6:11 AM

Hi there,

 

I'm looking for a Flex flash video player that can be skinned using CSS and was hoping OSMF might be the answer. Somehow, I can't seem to find any examples of it? They all seem to be Flash related.

 

Thanks

 
Replies
  • Currently Being Moderated
    Aug 10, 2010 7:03 AM   in reply to ttehify

    I haven't seen that OSMF has any CSS parsing/skinning capabilities built in, but it does have an example of a FlexUI component:

    MediacontainerUIComponent under apps\samples\framework - you can use that as a base Container for OSMF and build a larger Flex component on top of it.

     

    I think you'd have to construct your own system for reading in CSS, while you can use the Chrome skinning interface (example is the OSMFPlayer under apps\samples\framework) - that only seems to allow for a fixed external fonts. You might be able to pull in an assign different fonts to different assets, but I haven't experimented with that.

     

    -Will

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2010 9:41 AM   in reply to ttehify

    There is a new OSMF.swc available from Adobe on the OSMF downloads page, do not use the OSMF.swc that is packaged with Flash Builder 4 as it is not the most recent.

     

    I have had the most success in compiling from the raw AS3 source files found in the SVN trunk of the OSMF project, as there are also updated changes in those files as well. However, if you have need for the SWC, then re-compiling it yourself is an option.

     

    Also, make sure that you have added your additional compiler settings for OSMF:

    -define CONFIG::LOGGING false -define CONFIG::DEBUG true -define CONFIG::FLASH_10_1 true

     

    FLASH_10_1 set to true is required for HTTP streaming - but all of these settings are required to be present in the compiler build statement.

    -Will

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2010 12:05 PM   in reply to ttehify

    That example appears to be based on the old version of OSMF. Since then there were API changes that won't complie with OSMF1.0.

    Have you imported MediaContainerUIComponent and it says no type MediaContainer found?  What version of OSMF.swc or library are you using?

    Are you using Flex builder (Flash builder)?

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2010 12:18 PM   in reply to ttehify

    To get to the compiler in for the "define settings"

    Click on the Project top folder> Right Click > Properties > Flex Compiler

    Add the above info to "Additional compiler arguements:" space.

     

    Download the OSMF Trunk via SVN to a directory.

    In the project properties select "Flex Build Path" and under Source Path add that folder.

     

    Remove in the Library under flex 4.1 (or whatever SDK) the OSMF.swc (as that will cause a conflict).

    Make sure you have downloaded the most recent "playerglobal.swc" from AdobeLabs, then you'll want to "Add SWC" and link that swc to you project.

     

    Maybe not the best example link because some of the tags aren't closed and seem to be misplaced, could be used with some corrections, but I don't have the time to make them for you.  Highly recommend the the media component above for flex, but it still will require you to add some code to get it to work.


    -Will

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2010 1:31 PM   in reply to ttehify

    Unfortunately, using the command line compiler isn't a forte of mine, and I'd have to defer to someone else with more experience with it.

    Basic overview of what I think you'll need to do - add in the "source path" of the osmf source files (-source-path ?), add in the definition statements, (-define CONFIG::DEBUG false etc.).

     

    Since there's a bunch of different settings that you'll have to set, then looking up how to build a configuration xml file would probably be best for expediency - that information can be found online with the mxmlc compiler docs.

     

    -Will

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 10, 2010 3:11 PM   in reply to ScreenName1710b

    Here's some feeback from Flex folk

     

    What build of Flex are you compiling with? Where did you get osmf.swc?

     

    The quick solution to your problem is to turn off RSLs by compiling with the  "-static-rsls=true" option.

     

    They think that this sounds like rsl so can you try this?

     

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 11, 2010 12:29 AM   in reply to ScreenName1710b

    You can also try to use an ant task for compiling your project. It might be easier then using the command line directly.

     

    Here is a sample build.xml that might get you started:

    http://sourceforge.net/adobe/smp/svn/LATEST/tree/trunk/

     

    It sets the necessary compile options, and builds both the OSMF library and a player that uses it. You can target either 10.0 or 10.1 by changing the properties files.

     

    Hope this helps,

    Andrian

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 4, 2010 10:20 AM   in reply to ttehify

    Hello,

    I am looking for a Flex Player example which can play .f4m files and listen for Cue points.

     

     

    My first try, but I get :

     

    Error: The specified capability is not currently supported

     

     

     

     

    <fx:Script>
              <![CDATA[
                   import mx.events.FlexEvent;
                   
                   import org.osmf.containers.HTMLMediaContainer;
                   import org.osmf.elements.HTMLElement;
                   import org.osmf.elements.VideoElement;
                   import org.osmf.media.MediaElement;
                   import org.osmf.media.MediaPlayer;
                   import org.osmf.media.URLResource;
                   import org.osmf.metadata.TimelineMetadata;
                   
                   [Bindable] private var player:MediaPlayer = new MediaPlayer();
                   
                   [Bindable] private var stream:String = "http://188.194.84.42/vod/September_Drive_by_Lightrocker_1/September_Drive_by_Lightrocker_1.f4m";
                   
                   //private var embeddedTimelineMetadata:TimelineMetadata;
                   
                   
                   private var media:MediaElement = new VideoElement(new URLResource(stream));
                   
                   protected function application1_creationCompleteHandler(event:FlexEvent):void
                   {
                        media = new  VideoElement( new URLResource(stream));
                        player.media =  media
                        player.play();
                   }
     
              ]]>
         </fx:Script>
    

     

    Cheers

    Marc

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2010 1:51 PM   in reply to ttehify

    Hiya,

     

    I got OSMF 1.5 up for Flex 3 and 4. It's the actual playback and controls, you would be free to add your buttons as you want.

    http://blog.mariovieira.net/?p=176

     

    Hope it helps!

    M

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 13, 2010 3:22 PM   in reply to MarioVieira.net

    What about *.f4m File Playback ?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 14, 2010 12:16 AM   in reply to daslicht

    just addded this player type

    select "flashMediaManifestF4M" for playerType in the OSMFPlayer

    http://blog.mariovieira.net/?p=176

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points