Html5 video monitors real-time playback progress
Video objects can monitor real-time playback progress through ontimeupdate time
var videoPlayer = document.getElementById("video");
videoPlayer.ontimeupdate = function () { timeUpdate(); };
function timeUpdate() {
document.getElementById('time').innerHTML = video.currentTime;
}
explain
给video添加ontimeupdate监听这个监听可以实时监控播放进度,然后在监听当中不断调用方法