Skip to main content
August 30, 2007
Question

Preventing a NetStream.Buffer.Flush

  • August 30, 2007
  • 1 reply
  • 779 views
I need to buffer a large amount of (non-live) streaming content in the background while the user is distracted with something else. So far, the only way I've found make the NetStream (or the FLVPlayback control) buffer is to put it in a "play" state. Doing that and setting the bufferTime to a really high value is a partial solution.

The problem is, once it either has the specified amount buffered or has the entire thing buffered, it starts playing. But I need it to not start playing until the user is ready for it. But setting it to anything other than the play state, including pausing it, flushes the buffer! (I can see why it might be good for a stop to flush the buffer. A PAUSE should not flush the buffer...)

Is there any workaround to this? I've even tried canceling the NetStream.Buffer.Flush event, but of course it's not "cancelable." I'll take any bizarre hack anyone can come up with at this point!
    This topic has been closed for replies.

    1 reply

    Participant
    September 9, 2007
    Did you find a solution to this? I am developing a player for streaming flvs and the buffer flushing everytime the netstream gets paused is called is causing me grief. I want the buffertime to keep loading if the user pauses the stream..
    September 13, 2007
    Nope. And I'd still dearly love to find one. The only workaround to my particular problem (of it starting to play before I was ready for it) was to detect that the entire file was loaded, and then pause it (to clear the buffer) and play it (to start the whole buffering process over again). NOT the solution I was looking for...
    Participating Frequently
    September 14, 2007
    unfortunately there is no solution to this issue by now.
    I hope FMS3 could change this annoying behaviour