This content has been marked as final. Show 6 replies
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.
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.
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.
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.
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.
OK, thanks for the info. I'll check it out.