html5 video获取实时播放进度的方法详解编程语言

getvideoprogress();

function getvideoprogress() {
setTimeout(function () {
var vid = document.getElementById(“video1”);
var currentTime=vid.currentTime.toFixed(1);
if(currentTime==1.2){
//触发
return false;
}
console.log(currentTime);
getvideoprogress();
}, 50);
}

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/18908.html

(0)
上一篇 2021年7月19日 21:35
下一篇 2021年7月19日 21:35

相关推荐

发表回复

登录后才能评论