js调用video的播放时长
2021-03-20 04:25
阅读:352
标签:html style doc mes eve sele var mat tom
// 秒转换分钟00:00:00格式
function timeToMinute(times){
var t;
if(times > -1){
var hour = Math.floor(times/3600);
var min = Math.floor(times/60) % 60;
var sec = times % 60;
if(hour 10) {
t = ‘0‘+ hour + ":";
} else {
t = hour + ":";
}
if(min 10){t += "0";}
t += min + ":";
if(sec 10){t += "0";}
t += sec.toFixed(2);
}
t=t.substring(0,t.length-3);
return t;
}
js调用video的播放时长
标签:html style doc mes eve sele var mat tom
原文地址:https://www.cnblogs.com/zhaoying/p/12742254.html
评论
亲,登录后才可以留言!