mirror of
https://github.com/photonstorm/phaser
synced 2024-12-03 09:59:42 +00:00
Dispatching seek event after the source has been updated
This commit is contained in:
parent
a1bd4e4244
commit
b806d66e0d
1 changed files with 4 additions and 4 deletions
|
@ -491,12 +491,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', {
|
|||
if (this.isPlaying || this.isPaused) {
|
||||
value = Math.min(Math.max(0, value), this.duration);
|
||||
this.currentConfig.seek = value;
|
||||
if (this.isPlaying) {
|
||||
this.stopAndRemoveBufferSource();
|
||||
this.createAndStartBufferSource();
|
||||
}
|
||||
this.events.dispatch(new SoundValueEvent(this, 'SOUND_SEEK', value));
|
||||
}
|
||||
if (this.isPlaying) {
|
||||
this.stopAndRemoveBufferSource();
|
||||
this.createAndStartBufferSource();
|
||||
}
|
||||
}
|
||||
});
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue