1. 程式人生 > >臨時文件

臨時文件

com log eof wid .com video tle insert tex

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Insert title here</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>

<body>

<video
    id="video-active"
    class="video-active"
    width="640"
    height="390"
    controls="controls">
    <source src="video/test.mp4" type="video/mp4">
</video>
<div id="current">0:00</div>
<div id="duration">0:00</div>

<script>

$(document).ready(function(){
    var vid = document.getElementById("video-active");
    vid.playbackRate = 0.01;
  
  
  $("#video-active").on(
    "timeupdate", 
    function(event){
      onTrackedVideoFrame(this.currentTime, this.duration);
    });
})

function onTrackedVideoFrame(currentTime, duration)
{
    $("#current").text(currentTime);
    $("#duration").text(duration);
}

</script> 

</body>

</html>

  

臨時文件