关于html5 video
获取视频长度
<video id="video" width="200px" height="auto" src="videos/demo.mp4" > your browser does not support the video tag! <!--当浏览器不支持html5的video标签时,做出相应的提醒。--> </video>
<script src="https://files.cnblogs.com/files/heyiming/jquery-2.1.4.min.js"></script>
<script> $(document).ready(function(){ $("#video")[0].addEventListener("loadedmetadata", function(){ var tol_time = this.duration;//获取视频总时长 alert(tol_time); }); }); </script>