diff --git a/src/components/Recorder.js b/src/components/Recorder.js index 8faed86..e0190e6 100644 --- a/src/components/Recorder.js +++ b/src/components/Recorder.js @@ -248,7 +248,9 @@ export default class Recorder extends H5P.EventDispatcher { this.stream.getAudioTracks().forEach(track => track.stop()); this.sourceNode.disconnect(); this.scriptProcessorNode.disconnect(); - this.audioContext.close(); + if (this.audioContext.state !== 'closed') { + this.audioContext.close(); + } delete this.userMedia; }