播放视频时,解决视频加载一直计时问题

This commit is contained in:
nisen
2023-11-21 10:17:01 +08:00
parent 50de4fcb99
commit 18092b9a0b
2 changed files with 19 additions and 2 deletions

View File

@@ -1477,10 +1477,10 @@
//如果当前追加开始时间不为空
let now = new Date();
let m = now.getTime() - this.appendStartTime.getTime(); //相差的毫秒数
console.log(m/1000,'时间');
// console.log(m/1000,'时间');
let sen = Math.round(m / 1000); //计算秒数
console.log('定时器时间',sen);
// console.log('定时器时间',sen);
// 每次添加的是定时器计时的时间
duration = duration + sen;//追加的是秒
if (duration >= 60) { //一分钟保存一次