PDA

View Full Version : FLV seeking not synchronous with mouse move


asscripter
01-14-2008, 11:59 AM
Hi i'm making a simple flv player where i'm creating the seekbar to show the video playback progress.

While i drag the dragger (small rectangle to show video progress) the video frames do not update fast enough with the dragger.

mc_VideoSeekbar.mc_Drager.onPress = function() {
this.startDrag(false, 0, 0, 250, 0);
this.onEnterFrame = function() {
var base = this._parent.mc_Track._width-this._width;
var perc:Number = Math.round(this._x*100/base);
this._parent._parent.mc_FLVPlayback.seek(perc/100*iTotalDuration);
};
};
mc_VideoSeekbar.mc_Drager.onRelease = mc_VideoSeekbar.mc_Drager.onReleaseOutside=functio n () {
this.stopDrag();
delete this.onEnterFrame;
};

mc_FLVPlayback is the flash's FLVPlayback component.

Pls suggest how can i optimise the code to show realtime video seeking?

sd9sd
01-14-2008, 12:36 PM
Hope this will help: Read the whole post and follow any links in it.
http://www.actionscript.org/forums/s...ight=netstream

If you insert more keyframes in your video using a video converter, seek will get more places to stop.

asscripter
01-15-2008, 04:08 AM
Thanks for the link, but I'm not able to access the link. It gives me '404 page not found' error.

Apart from that it seems that i'm required to do some manipulations in the flv to achieve this task. Unfortunately the flv is supposed to be on some server, and i'hv no access to the physical place of the server. I wont be able to put any additional keyframes in the video.

Any idea?

asscripter
01-15-2008, 11:40 AM
I hav used the same code using NetStream with video component rather than earlier FLVPlayback component and it just works fine.

Can anyone still figure out why the same wont work with flash's FLVPlayback component.

sd9sd
01-15-2008, 05:45 PM
Darn! I'll post the file if I still have it with me.
I used netstream when I got quite dejected with the limited functionality of the flv playing component.

sd9sd
01-16-2008, 07:04 AM
Here you go. The file is attached. Streaming video with netstream rather than the flv component.
I didn't have the time to make the seek bar draggable.
It would be really nice of you if you could add the dragging code and post the fla back here.