Link to home
Start Free TrialLog in
Avatar of nysurf1
nysurf1

asked on

flv total time

How can i get the total time of a externaly loaded flv video , I am using as3 with the netsream class.
Thanks
Avatar of bugs021997
bugs021997
Flag of India image

@nysurf1

Try using NetStream.time()
ASKER CERTIFIED SOLUTION
Avatar of The_Blasted_One
The_Blasted_One
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note that onMetaData may not work with some flvs (which don't contain any metadata). In this case I can only recommend you to do some calculations with NetStream's bufferLength, bytesLoaded properties and file size. You can determine the estimated length, but it will be veeeeery approximate.

I suppose you can obtain file size with flash.net.FileReference's onProgress method, although some server-side solution like PHP will do this work better and plainer.

NetStream.time() is the current video position, isn't it?