mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 05:33:35 +00:00
Limiting seek value to be between 0 and current duration in seek property setter
This commit is contained in:
parent
7920ad3b6d
commit
f347bcc45a
1 changed files with 1 additions and 0 deletions
|
@ -277,6 +277,7 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', {
|
|||
}
|
||||
},
|
||||
set: function (value) {
|
||||
value = Math.min(Math.max(0, value), this.duration);
|
||||
this.currentConfig.seek = value;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue