音频自动结束清除计时

This commit is contained in:
nisen
2023-11-21 17:11:05 +08:00
parent 941de8ffc7
commit e16ca48c4a

View File

@@ -153,6 +153,8 @@
this.audioContext.play();
this.playing=true;
this.currentTime=this.formatSeconds(second);
// 重新计时
this.$emit("onPlay",this.audioContext);
},
onPlayerPlay(){
//console.log('开始播放');
@@ -183,7 +185,11 @@
this.checkSecond=intTime;
this.$emit("onPlaying",this.audioContext,intTime);
}
// 相等的时候,关闭计时
if(this.currentTime == this.allTime){
//图标变换
this.onPlayerEnded()
}
}
},
onPlayerEnded(){