소스 검색

关闭 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) {