Skip to main content
Participant
April 11, 2007
Question

NetStream Buffer Pause

  • April 11, 2007
  • 1 reply
  • 443 views
I have a progressive video file FLV which is dynamically loaded using AS NetStream function.
Now I want to stop the buffering of the video after a certain amount of bytes are being loaded. For example, the FLV size is 10mb and I want to PAUSE the buffer after the 2mb of bytes are loaded. During the PAUSE of the buffer, the connection should be ON and I should be able to play the video.
Is there any way we can PAUSE the buffer and after certain amount of time, we again can START the buffering process? Say it should again start buffering after 2 minutes.

Thanks in advance. AS NetStream
    This topic has been closed for replies.

    1 reply

    April 11, 2007
    It's possible, but not with just an http server.

    Have a look at the following article:

    http://flashcomguru.com/index.cfm/2005/11/2/Streaming-flv-video-via-PHP-take-two

    Since the php proxy is reading the file from a given byte, it wouldn't be all that hard to modify to define an end byte as well. The on the AS side, you'd just need to work out your logic for when you want to resume download.

    I should mention that when using this apprach, each request to the php document is a new request, not a "continuation" of the download. As a result, you won't have a single .flv file in cache, but rather, a separate flv for each request. If your idea here is to save bandwdith, this method would actually work against you. If it's all about managing bandwidth/data transfer, I'd use FMS or another streaming server.
    gdmaxAuthor
    Participant
    April 12, 2007
    Thanks for your reply, but this could not solve my problem.

    I can actually stop the buffering at reaching at a particular bytes. For this I need to close the connection. But when the connection is closed, I could not play the movie. I want the movie to be playable, just want to pause the buffer without actually disconnecting from the server.

    Is it possible without using FMS or streaming server?
    April 12, 2007
    AFAIK, there is no way to stop the download and continue playback at the same time. Once the netconnection is closed. the stream stops playing.