views:

51

answers:

1

Hey guys,

Could be a known issue, an issue with my code or an oversight on my part.

I have created a video player in flash. I have got it playing progressive and streaming over rtmp/rtmpt so that is all fine.

My only issue is that when the video's are playing, the time-codes for time played and time remaining are not synced. So, if my video is 20 secs long and 5 have been played, time played will be 5secs, time remaining will be 16secs until it updates about half a second later.

So even though they are both being set with the same line of code, there are not changing at the same time. The time played changes, then a split second later the time remaining changes.

Anyone got any idea what this could be. Maybe a miscalculation on my part. Maybe I need to round up or down the remaining time. How can I sync the two times.

I understand this is probably an tough question to answer, I have done my best to explain it.

Thanks in advance.

A: 

This could be just as simple as an issue with how often you're updating each item.

More info is needed. Is this a custom video player? Are you using the FLVPlayback component? How are you setting the time?

It sounds like the current time and total time are more accurate than the time remaining. If this IS a custom video player, is there any reason why instead of using two variables for the time remaining and the time played you can't just set the time played using a variable and then set the time remaining to be (totalTime - timePlayed)? That way, they'll be in sync.

This is just guessing at this point. More info is needed.

lewiguez