Skip navigation
Currently Being Moderated

Buffer size for spark video player

Apr 12, 2010 11:29 PM

is there any way to control the buffer length in spark videoplayer component ?

 
Replies
  • Currently Being Moderated
    Apr 13, 2010 8:28 AM   in reply to rajdeeprath

    No, there currently isn't.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 13, 2010 1:18 PM   in reply to Brian Riggs

    I think you should be able to access the videoDisplay's videoPlayer property (which gives you access to the OSMF MediaPlayer object).  It's mx_internal, meaning it's something that Flex provides access to for advanced users, but it's not a documented or officially support API.  However, try something like:

     

    import mx.core.mx_internal;

     

    myFlexVideoPlayer.videoDisplay.mx_internal::videoPlayer.bufferTime = XXX;

     

    Good luck,

    Ryan

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 15, 2010 2:54 PM   in reply to rajdeeprath

    Accessing the variable and setting it works for me.  Here's a simple example:

     

    <s:VideoPlayer creationComplete="myFlexVideoPlayer.videoDisplay.mx_internal::videoPl ayer.bufferTime" id="myFlexVideoPlayer" />

     

    One thing to note is that videoDisplay isn't always around as it's part of the skin.  So I can access it at creationComplete time, but I can't access it at pre-initialize time.  To debug your particular null pointer exception, I'd have to see code, but my guess is it's with videoDisplay.  But you can hop in to the debugger and figure out what's null.  It's also a great way to figure out what properties are around and available to you.

     

    Good luck,

    Ryan

     
    |
    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