【问题标题】:How to I retrieve the length in seconds of a <video> element using Javascript?如何使用 Javascript 检索 <video> 元素的长度(以秒为单位)?
【发布时间】:2010-07-27 02:55:15
【问题描述】:

我有一个 ID 为“liveVideo”的&lt;video&gt; 标签。如何以秒为单位检索视频的长度?

谢谢,

大卫!

【问题讨论】:

  • 是的,

标签: javascript jquery html html5-video


【解决方案1】:
【解决方案2】:
$('#liveVideo').attr('duration') // will return the full length of the movie

【讨论】:

    猜你喜欢
    • 2010-11-02
    • 1970-01-01
    • 1970-01-01
    • 2011-06-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-28
    • 2014-02-03
    相关资源
    最近更新 更多