Seek ns.bytesLoad Issues

Hello everyone,

I’m at my wits end with some sort of bug I ran into this morning. There seems to be a problem when I request the last available frame of a video I’m streaming.

ns.seek((ns.bytesLoaded / ns.bytesTotal) * nsDuration);

Sometimes it works, sometimes it returns a unhandled event. (Invalid seek time)

I’m confused and I haven’t got a clue what I’m doing wrong since I used this type of code before on more than one occasion.

If anyone can provide insight it would be greatly appreciated. Thx.