From 833d3b3aba3fbdbc0ffe81e7821c8ae37a2bafc4 Mon Sep 17 00:00:00 2001 From: Rui Zhi Date: Sun, 11 Mar 2018 14:12:25 -0400 Subject: [PATCH] fix the sound recorder issue --- gui.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui.js b/gui.js index fe5ba0b3..b8c438d0 100644 --- a/gui.js +++ b/gui.js @@ -9116,6 +9116,11 @@ SoundRecorderDialogMorph.prototype.buildProgressBar = function () { }; SoundRecorderDialogMorph.prototype.record = function () { + if (this.mediaRecorder && this.mediaRecorder.state !== 'inactive') { + this.stop(); + return; + } + this.mediaRecorder.start(); this.recordButton.label.setColor(new Color(255, 0, 0)); this.playButton.label.setColor(new Color(0, 0, 0));