Skip to content

Commit

Permalink
Release stream tracks and close audioContext on stop recording in lam…
Browse files Browse the repository at this point in the history
…ejs plugin (#197)
  • Loading branch information
mafflin authored and thijstriemstra committed Dec 30, 2017
1 parent f83df4f commit ff94884
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/js/plugins/lamejs-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class LamejsEngine extends RecordEngine {
this.audioSourceNode.disconnect();
this.processor.disconnect();
this.processor.onaudioprocess = null;
this.inputStream.getAudioTracks().forEach(track => track.stop())
this.audioContext.close()

this.engine.postMessage({cmd: 'finish'});
}
Expand Down

0 comments on commit ff94884

Please sign in to comment.