Set playhead ahead of buffered VideoDisplay

290 Views Asked by At

As an example of how this might be handled, YouTube will unload the video and start loading it from the position the user clicked on the timeline.

Currently all I have is:

private function seekHandler(event:MouseEvent):void {
    player.playheadTime = event.localX/playheadBar.width*player.totalTime;
}

This works perfectly if the target position is already buffered. However, if I want to seek ahead of the buffer, I would expect it to pause the video until the file has buffered to the selected point. Instead, it pauses for a moment, then acts like "nope, ain't gonna do it" and continues playing from where it was.

Note that I'm only just learning Flex/AS3, so I may well have missed something obvious ;)

0

There are 0 best solutions below