mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Defined startTime property
This commit is contained in:
parent
82819ec782
commit
d6256c47c5
1 changed files with 11 additions and 2 deletions
|
@ -26,6 +26,16 @@ var HTML5AudioSound = new Class({
|
|||
* @default null
|
||||
*/
|
||||
this.audio = null;
|
||||
/**
|
||||
* Timestamp as generated by the Request Animation Frame or SetTimeout
|
||||
* representing the time at which the delayed sound playback should start.
|
||||
* Set to 0 if sound playback is not delayed.
|
||||
*
|
||||
* @private
|
||||
* @property {number} startTime
|
||||
* @default 0
|
||||
*/
|
||||
this.startTime = 0;
|
||||
this.duration = this.tags[0].duration;
|
||||
this.totalDuration = this.tags[0].duration;
|
||||
BaseSound.call(this, manager, key, config);
|
||||
|
@ -192,7 +202,6 @@ Object.defineProperty(HTML5AudioSound.prototype, 'seek', {
|
|||
if (this.isPlaying || this.isPaused) {
|
||||
value = Math.min(Math.max(0, value), this.duration);
|
||||
if (this.isPlaying) {
|
||||
this.previousTime =
|
||||
this.audio.currentTime = value;
|
||||
}
|
||||
else if (this.isPaused) {
|
||||
|
|
Loading…
Reference in a new issue