Skip to content

Commit 1e08945

Browse files
Fixed pickAudioTag method docs
1 parent c745e09 commit 1e08945

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,30 +290,25 @@ var HTML5AudioSound = new Class({
290290
for (var i = 0; i < this.tags.length; i++)
291291
{
292292
var audio = this.tags[i];
293-
294293
if (audio.dataset.used === 'false')
295294
{
296295
audio.dataset.used = 'true';
297296
this.audio = audio;
298297
return true;
299298
}
300299
}
301-
302300
if (!this.manager.override)
303301
{
304302
return false;
305303
}
306-
307304
var otherSounds = [];
308-
309305
this.manager.forEachActiveSound(function (sound)
310306
{
311307
if (sound.key === this.key && sound.audio)
312308
{
313309
otherSounds.push(sound);
314310
}
315311
}, this);
316-
317312
otherSounds.sort(function (a1, a2)
318313
{
319314
if (a1.loop === a2.loop)
@@ -323,15 +318,12 @@ var HTML5AudioSound = new Class({
323318
}
324319
return a1.loop ? 1 : -1;
325320
});
326-
327321
var selectedSound = otherSounds[0];
328-
329322
this.audio = selectedSound.audio;
330323
selectedSound.reset();
331324
selectedSound.audio = null;
332325
selectedSound.startTime = 0;
333326
selectedSound.previousTime = 0;
334-
335327
return true;
336328
},
337329

0 commit comments

Comments
 (0)