mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Updating sound duration only if it is not set yet (equal to 0)
This commit is contained in:
parent
d664a7d4a6
commit
920e083a8a
1 changed files with 5 additions and 1 deletions
|
@ -226,8 +226,12 @@ var HTML5AudioSoundManager = new Class({
|
|||
this.once('unlocked', function ()
|
||||
{
|
||||
this.forEachActiveSound(function (sound)
|
||||
{
|
||||
if(sound.duration === 0)
|
||||
{
|
||||
sound.duration = sound.tags[0].duration;
|
||||
}
|
||||
|
||||
sound.totalDuration = sound.tags[0].duration;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue