Skip navigation
Currently Being Moderated

OSMF - How to control Buffering

Mar 24, 2010 5:40 AM

Hello, i hope someone is able to help me:


I've programmed an OSMF-Videoplayer in Flash(AS3).


I pass the Video by flashVars (no streaming..), and everything works just fine - but the problem is, that i don't want the player to begin buffering right from the start - the user first should click on the play button, and then buffering should begin. (But it also would be great if the first frame of the video would be visible)


Is there a posibility to control that with OSMF? I'ver searched the API and tried everything that came to my mind (onViewable, onDurationChange-Events)..


Is there an easy solution for my problem? Thanks

  • Currently Being Moderated
    Mar 24, 2010 9:04 AM   in reply to richardpietsch

    By default, the player doesn't auto-buffer, it should not begin to download the bytes of the video until play() is called.  Are you seeing otherwise?


    To display the first frame of the video, there are various options:

    1. Do a play-pause sequence.  The downside is that this will cause the video to auto-buffer, which is probably not what you want.  (The other downside is that it's fairly complicated to implement right, in that you should do a seek(0) after the pause, and ensure the volume is muted until the sequence completes, then unmuted afterwards.)  We don't have an API for this, since most web players use poster frames for the first frame-to-show, which brings me to:

    2. Use a poster frame, i.e. a separate image file that is shown up front.  The advantage here is that you can show any image you want (often the first frame of the video isn't that interesting).  We have a few examples showing how to integrate a poster frame directly into your MediaElement (see "Poster Frame" here: mework/ExamplePlayer/org/osmf/examples/, or you can choreograph the image and the video yourself (i.e. separately).

    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