Buffer bar for video encoded with vbr (variable bite rate)

So when you do a buffer you calculate the ratio between bytesTotal and bytesLoaded, and apply that ratio to a sprite which represents the amount of buffered data.

The problem with VRB is that you can a few seconds with few data, and then some second with a different mount of data. Which is good… but the problem is when your buffering bar represents the time of the video (like in you tube).

So your cursor representing the actual time of the video can move further away than the buffer bar… which isn’t really nice.

Anyone had this proble before?

How can I know how much TIME has been loaded and not how many bytes have been loaded?