From cd6d755f00b4633e68d63fb2e2b1910ffa03b32c Mon Sep 17 00:00:00 2001 From: Gubolin Date: Sat, 2 Aug 2014 16:28:15 +0200 Subject: Pause bug (fix #440) --- objects.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/objects.js b/objects.js index 323ccab..e4d0928 100644 --- a/objects.js +++ b/objects.js @@ -5518,9 +5518,16 @@ StageMorph.prototype.pauseAllActiveSounds = function () { }; StageMorph.prototype.resumeAllActiveSounds = function () { + var newSounds = []; // remove Sounds that have been played so they do not resume + this.activeSounds.forEach(function (audio) { - audio.play(); + if (audio.ended === false) { + newSounds.push(audio); + audio.play(); + } }); + + this.activeSounds = newSounds; }; StageMorph.prototype.muteAllSounds = function () { -- cgit v1.3.1