开发者

How to I retrieve the length in seconds of a <video> element using Javascript?

I have a <video> tag with the id of "liveVideo". How do I retrieve the length of t开发者_JAVA技巧he video in seconds?

Thanks,

David!


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


$('#liveVideo').attr('duration') // will return the full length of the movie
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜