瀏覽代碼

关闭 audioContext

Michael Wang 5 年之前
父節點
當前提交
d3b39313cb
共有 1 個文件被更改,包括 4 次插入0 次删除
  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) {