1. Get the video time length When the video is loaded into the video, use the onloadedmetadata event to get the video time length.
video.onloadedmetadata = function () {
var vLength = video.duration;
console.log(vLength);
}
2. Playback progress of the current video When the video starts playing, you can use the ontimeupdate event to get the current playback progress of the video. The ontimeupdate event is triggered when the currentTime property of the video object changes. The currentTime property is a floating point decimal number that can take up to 12 digits of decimal places.
video.ontimeupdate = function () {
var vTime = video.currentTime;
console.log(vTime);
};