Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flv and seek problems

Status
Not open for further replies.

lastingforhours

Programmer
Dec 29, 2004
49
US
ive come across a weird problem that is a little hard to explain...

i made a video player that has rewind and fast forward buttons. both buttons wont behave the way i want them too. i simply want them to skip ahead or back .5 seconds from the current position. here is my code for those two buttons.

Code:
//fast forwarding
var seekPos = stream.time + .5;
stream.seek(seekPos);

//rewinding
var seekPos = stream.time - .5;
stream.seek(seekPos);

now, whats happening is when i rewind or fast forward the video, they totally ignore the first 25 seconds of the video and another portion of time near the end of the video. the rewind function gets stuck when it tries to rewind beyond 25 seconds into the video and both buttons skip about 7 to 10 seconds instead of half of a second.

i also have conditions setup to make it skip to the beginning or end if you seek beyond the beginning or end of the video but that isnt contributing to my problem.

also, the file isnt corrupted, i really doubt the video is causing the problem.

so, does anyone have any suggestions? or even any resources online that could help. thanks!

--
Matt Milburn, Wave Motion Studios
matt@wavemotionstudios.com
 
I was able to improve the situation with using only integer for seek target time, for example:

var seekPos = Math.floor(stream.time - 2);

I just did a test and the video went back to 0.083 - I assume this is the first key frame in my test video.

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top