我有<video>
标记,其ID为“liveVideo”。如何在几秒钟内检索视频的长度?
谢谢,
大卫!
答案 0 :(得分:5)
media.duration
检查规范http://www.w3.org/TR/html5/video.html#offsets-into-the-media-resource
答案 1 :(得分:3)
$('#liveVideo').attr('duration') // will return the full length of the movie