mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Resetting previousTime property when stopping sound or hijacking audio from another sound
This commit is contained in:
parent
de9e5a0d1f
commit
398b337da9
1 changed files with 2 additions and 0 deletions
|
@ -153,6 +153,7 @@ var HTML5AudioSound = new Class({
|
|||
selectedSound.reset();
|
||||
selectedSound.audio = null;
|
||||
selectedSound.startTime = 0;
|
||||
selectedSound.previousTime = 0;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
@ -161,6 +162,7 @@ var HTML5AudioSound = new Class({
|
|||
this.audio.dataset.used = 'false';
|
||||
this.audio = null;
|
||||
this.startTime = 0;
|
||||
this.previousTime = 0;
|
||||
},
|
||||
reset: function () {
|
||||
BaseSound.prototype.stop.call(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue