Hi,
I’m currently working on a video playing app, and all is fine, except for one odd bug.
I have a standard seek drag bar. When the video is paused at start and I used that seek bar, the video will seek to the point I drag to, then when it plays, will play OK for a second or so, then either pause for the amount of time I set the seek for and then play again normally, or simply jump to some odd point.
If I play the video, and then use the seek bar, it works perfectly.
I tracked all the relevant stream times etc, nothing seems amiss, but for some reason, when you seek to a point from a paused (at start) file it seems to crap out. It seems that Flash needs to play the file for a little bit to get itself all in sync.
Has anyone encountered anything like this, any work arounds?
Heres my seek function, which acts as a setter in a video class;
//set current video seek
public function set SeekPointAsPercent(newPercentPos:Number) {
if (videoMetaData!==null) {
var newVideoPos:Number = videoMeta.duration*newPercentPos;
videoStream.seek(newVideoPos);
} else {
trace("Attempting to access video meta data before we have any!");
}
}
I should note, this is for progressive video, and the file is completely loaded.