Ver código fonte

关闭 audioContext

Michael Wang 5 anos atrás
pai
commit
d3b39313cb
1 arquivos alterados com 4 adições e 0 exclusões
  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) {