Browse Source

关闭 audioContext

Michael Wang 5 năm trước cách đây
mục cha
commit
d3b39313cb
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      src/features/OnlineExam/Examing/QuestionAudio.vue

+ 4 - 0
src/features/OnlineExam/Examing/QuestionAudio.vue

@@ -67,6 +67,10 @@ export default {
   },
   beforeDestroy() {
     this.source && this.source.stop();
+    if (this.context) {
+      this.context.close();
+      this.context = null;
+    }
   },
   methods: {
     formatTime(seconds) {