mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 20:07:08 +00:00
Returning config value when paused and 0 when stopped when getting seek value
This commit is contained in:
parent
e4ca4d4b75
commit
8d161ac06d
1 changed files with 4 additions and 1 deletions
|
@ -258,9 +258,12 @@ Object.defineProperty(WebAudioSound.prototype, 'seek', {
|
||||||
if (this.isPlaying) {
|
if (this.isPlaying) {
|
||||||
return this.getCurrentTime();
|
return this.getCurrentTime();
|
||||||
}
|
}
|
||||||
else {
|
else if (this.isPaused) {
|
||||||
return this.currentConfig.seek;
|
return this.currentConfig.seek;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
set: function (value) {
|
set: function (value) {
|
||||||
value = Math.min(Math.max(0, value), this.duration);
|
value = Math.min(Math.max(0, value), this.duration);
|
||||||
|
|
Loading…
Add table
Reference in a new issue