summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2014-08-02 16:28:15 +0200
committerGubolin <gubolin@fantasymail.de>2014-08-05 12:12:07 +0200
commitcd6d755f00b4633e68d63fb2e2b1910ffa03b32c (patch)
tree3b8fe9b1ad62c3bd2806bca9d7f274214ccbfa38
parentad400763c1f4cd10675a9e6bc56d1630d8c6cb5d (diff)
downloadsnap-cd6d755f00b4633e68d63fb2e2b1910ffa03b32c.tar.gz
snap-cd6d755f00b4633e68d63fb2e2b1910ffa03b32c.zip
Pause bug (fix #440)
-rw-r--r--objects.js9
1 files changed, 8 insertions, 1 deletions
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 () {