Quellcode durchsuchen

音频条暂停时间条件判断优化

natasha vor 1 Monat
Ursprung
Commit
aa5440c8c0

+ 2 - 2
src/views/book/courseware/preview/components/voice_matrix/components/AudioLine.vue

@@ -188,7 +188,7 @@ export default {
     });
     this.$refs[audioId].addEventListener('pause', () => {
       this.audio.playing = false;
-      if (this.hideSlider && this.audio.currentTime * 1000 + 5 > this.ed) {
+      if (this.hideSlider && this.audio.currentTime * 1000 - 300 > this.ed) {
         this.$emit('sentPause', true);
       }
       this.$emit('handleListenRead', false);
@@ -290,7 +290,7 @@ export default {
           }
         }, 50);
       } else if (this.hideSlider) {
-        if (this.audio.currentTime * 1000 + 5 > this.ed) {
+        if (this.audio.currentTime * 1000 - 300 > this.ed) {
           this.$refs[audioId].pause();
         }
       }