Skip to content

Commit eec19e1

Browse files
Removing locked actions from queue before performing it
1 parent 923ac40 commit eec19e1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/sound/html5/HTML5AudioSoundManager.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,10 @@ var HTML5AudioSoundManager = new Class({
235235
sound.totalDuration = sound.tags[0].duration;
236236
});
237237

238-
this.lockedActionsQueue.forEach(function (lockedAction)
238+
while(this.lockedActionsQueue.length)
239239
{
240+
var lockedAction = this.lockedActionsQueue.shift();
241+
240242
if (lockedAction.sound[lockedAction.prop].apply)
241243
{
242244
lockedAction.sound[lockedAction.prop].apply(lockedAction.sound, lockedAction.value || []);
@@ -245,7 +247,7 @@ var HTML5AudioSoundManager = new Class({
245247
{
246248
lockedAction.sound[lockedAction.prop] = lockedAction.value;
247249
}
248-
});
250+
}
249251

250252
}, this);
251253

0 commit comments

Comments
 (0)