0

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 ;)

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
  • youtube uses what we like to call pseudo-streaming. If you are trying to do this with straight progressive download... aint gonna happen. You need server side support. You should do some research on streaming... v/s HDS v/s progressive... its a very in depth topic that you could spend a month in. – Jason Reeves Nov 03 '12 at 04:15
  • Okay, but isn't that just a simple case of stopping the current download, then starting it again with a "Range" header? Or is there a problem because the buffer is measured in seconds and the bitrate may not be constant? Does FLV support variable bit rates? I can certainly work out how to check if the clicked time is before or after the buffer time, but what then? – Niet the Dark Absol Nov 03 '12 at 22:16
  • Yes to the header... but you need a server that supports it. Option 2 would be to use true streaming. But with regular progressive downloads, you can't seek to a position that is yet unknown. – Jason Reeves Nov 03 '12 at 22:44

0 Answers0