如何使用Javascript检索<video>元素的长度?</video>

时间:2010-07-27 02:55:16

标签: javascript jquery html html5 html5-video

我有<video>标记,其ID为“liveVideo”。如何在几秒钟内检索视频的长度?

谢谢,

大卫!

2 个答案:

答案 0 :(得分:5)

答案 1 :(得分:3)

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