Explorar el Código

关闭 audioContext

Michael Wang hace 5 años
padre
commit
d3b39313cb
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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) {