diff options
| author | Gubolin <gubolin@fantasymail.de> | 2014-08-02 16:28:15 +0200 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2014-08-05 12:12:07 +0200 |
| commit | cd6d755f00b4633e68d63fb2e2b1910ffa03b32c (patch) | |
| tree | 3b8fe9b1ad62c3bd2806bca9d7f274214ccbfa38 /objects.js | |
| parent | ad400763c1f4cd10675a9e6bc56d1630d8c6cb5d (diff) | |
| download | snap-cd6d755f00b4633e68d63fb2e2b1910ffa03b32c.tar.gz snap-cd6d755f00b4633e68d63fb2e2b1910ffa03b32c.zip | |
Pause bug (fix #440)
Diffstat (limited to 'objects.js')
| -rw-r--r-- | objects.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 () { |
