Skip to content

Commit 644a28c

Browse files
Pushing all tags in an array before loading them
1 parent 38e59f6 commit 644a28c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ var HTML5AudioSoundManager = new Class({
9393
if (this.touchLocked) {
9494
var unlock_1 = function () {
9595
document.body.removeEventListener('touchend', unlock_1);
96+
var allTags = [];
9697
_this.game.cache.audio.entries.each(function (key, tags) {
9798
for (var i = 0; i < tags.length; i++) {
98-
tags[i].load();
99+
allTags.push(tags[i]);
99100
}
100101
return true;
101102
});
102-
_this.forEachActiveSound(function (sound) {
103-
sound.pause();
104-
sound.resume();
103+
allTags.forEach(function (tag) {
104+
tag.load();
105105
});
106106
};
107107
document.body.addEventListener('touchend', unlock_1, false);

0 commit comments

Comments
 (0)