views:

49

answers:

2

I have a <video> tag with the id of "liveVideo". How do I retrieve the length of the video in seconds?

Thanks,

David!

+3  A: 

media.duration check the spec http://www.w3.org/TR/html5/video.html#offsets-into-the-media-resource

qw3n
+1 that was what on my mind.. ;)
Reigel
thanks, great reference, I will use it often
+2  A: 
$('#liveVideo').attr('duration') // will return the full length of the movie
Reigel
thank you, perfect