evild
July 25th, 2008, 03:04 PM
I'm having problems with buffering a large video and cue points I've embedded into the video.
I'm buffering 5 seconds of video before I begin to play. My first cue point is at 15 seconds. The buffer fills and the video starts to play. Ten (10) seconds in, my first cue point fires and the rest of the cue points in the video are also firing 5 seconds early. If I buffer 10 seconds of video, all my cue points fire 10 seconds early. If I leave the buffer time to default (.1) the cue points fire precisely.
The code I have listening to cue points works properly:
var cueListener:Object = new Object;
cueListener.onCuePoint = theCues;
stream.client = cueListener;
public function theCues(info:Object):void {
trace("cuepoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
}Does the listener go off what is buffered and not what is actually playing? That's what it seems like to me. The listener has already processed 5 seconds of video before it actually starts to play so that's why the first cue point is firing 10 seconds in instead of at 15 seconds.
Has anyone experienced this? Is there any way to prevent this?
I'm buffering 5 seconds of video before I begin to play. My first cue point is at 15 seconds. The buffer fills and the video starts to play. Ten (10) seconds in, my first cue point fires and the rest of the cue points in the video are also firing 5 seconds early. If I buffer 10 seconds of video, all my cue points fire 10 seconds early. If I leave the buffer time to default (.1) the cue points fire precisely.
The code I have listening to cue points works properly:
var cueListener:Object = new Object;
cueListener.onCuePoint = theCues;
stream.client = cueListener;
public function theCues(info:Object):void {
trace("cuepoint: time=" + info.time + " name=" + info.name + " type=" + info.type);
}Does the listener go off what is buffered and not what is actually playing? That's what it seems like to me. The listener has already processed 5 seconds of video before it actually starts to play so that's why the first cue point is firing 10 seconds in instead of at 15 seconds.
Has anyone experienced this? Is there any way to prevent this?