I have a html5 tag in page, but how can I know its duration time?
In a comment above, it was mentioned that the solution is to bind an event handle to the event loadedmetadata. This is how I did that -
audio.onloadedmetadata = function() { alert(audio.duration); };