6 Replies Latest reply on Nov 16, 2006 2:26 PM by RustyT

    Detecting End of Buffering (FLVPlayback)

      Is there some event or technique to detect that buffering is complete using the FLVPlayback component? Or even to detect how much buffering has been done so far?
        • 1. Re: Detecting End of Buffering (FLVPlayback)
          Nickels55 Level 2
          I can only imagine that if you constantly check the position of the playhead to see if it changes you'll know that buffering is complete. Theory only... never tried it.
          • 2. Re: Detecting End of Buffering (FLVPlayback)
            RustyT Level 1
            The FLVPlayback component does not have any events related to buffering except to notify when buffering has started.

            The only solution I can image for this problem is attempting to seek to the desired location on an interval (which is the goal when the FLV is buffered enough to start playing at a desired time in the clip) and if the FLVP is not in the "playing" state, try again later (on an interval).

            It would be good if there were events related to buffering progress included with the FLVPlayback component or the SeekBar.
            • 3. Detecting End of Buffering (FLVPlayback)
              Nickels55 Level 2
              The real question is why....
              why does it matter how much is buffered?

              What is the real end result you are going for here?
              Do you want an event to occur when the buffering ends before the video plays? Knowing what your attempting to accomplish can help to find a solution to a really non-existent problem. I can't think of any reasons why it matters how much of a movie is buffered.
              • 4. Detecting End of Buffering (FLVPlayback)
                RustyT Level 1
                Nickels55... OK, thanks for asking.

                What I'm trying to accomplish is to have the clip automatically start playing at a point within the clip, not at the beginning, when the flv loads.

                The start point—that is, the number of seconds inside the clip we want to automatically start playing—is specified by a variable passed from the web page, so we know where to seek the playhead to as soon as ActionScript starts running.

                The problem is this: If you try to seek to a point in the flv that has not yet been loaded (is still being buffered), nothing happens; which is, of course, what you would expect;

                So, this means we have to wait until the "start point" of the flv has been loaded before trying to play from that point. Of couse the problem is, how do we know when the start point has been loaded?

                Hope this makes sense.
                • 5. Re: Detecting End of Buffering (FLVPlayback)
                  digitellinc Level 1
                  Ok, you will either need to use the Flash Communication Server or The PHP hack solution (link below) to gain the best performance and not have any buffer time problems when starting a flv mid file.


                  You can also use these commands, but streaming options are the best.

                  VideoPlayer.bufferTime A number that specifies the number of seconds to buffer in memory before beginning to play a video stream.

                  VideoPlayer.bytesLoaded A number that indicates the extent of downloading in number of bytes for an HTTP download. Read-only.

                  VideoPlayer.bytesTotal A number that specifies the total number of bytes downloaded for an HTTP download. Read-only.

                  You can just use the buffer time, if you know how many seconds into the movie you need to start at.
                  • 6. Re: Detecting End of Buffering (FLVPlayback)
                    RustyT Level 1
                    OK, thanks for the info. I'll check it out.