From c6f6e37100bd9d5d240cee2ecfe75e3ddb6ac2e8 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Tue, 26 May 2020 16:15:53 +0200 Subject: [PATCH] enable Safari to close the sound recorder dialog --- snap.html | 2 +- src/gui.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snap.html b/snap.html index 027cbbfb..8e6cc053 100755 --- a/snap.html +++ b/snap.html @@ -10,7 +10,7 @@ - + diff --git a/src/gui.js b/src/gui.js index 14e74711..f072a7a2 100644 --- a/src/gui.js +++ b/src/gui.js @@ -78,7 +78,7 @@ Animation, BoxMorph, BlockEditorMorph, BlockDialogMorph, Note*/ // Global stuff //////////////////////////////////////////////////////// -modules.gui = '2020-May-22'; +modules.gui = '2020-May-26'; // Declarations @@ -9950,7 +9950,7 @@ SoundRecorderDialogMorph.prototype.ok = function () { SoundRecorderDialogMorph.prototype.destroy = function () { this.stop(); this.audioElement.remove(); - if (this.mediaRecorder) { + if (this.mediaRecorder && this.mediaRecorder.stream) { this.mediaRecorder.stream.getTracks()[0].stop(); } SoundRecorderDialogMorph.uber.destroy.call(this);