mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 09:26:45 +08:00
音频自动结束清除计时
This commit is contained in:
@@ -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(){
|
||||
|
||||
Reference in New Issue
Block a user