this.selectResourceTimer = null;
this.fetchResourceTimer = null;
+ this.timeUpdateTimer = null;
this.buffer = null;
this.node = null;
this.node.playbackRate.value = this._playbackRate;
this.node.start(0, this.nextStartTime);
this.node.onended = this.onended.bind(this);
+
+ this.timeUpdateTimer = setInterval(this.sendTimeUpdate.bind(this), 250);
},
+ sendTimeUpdate: function() {
+ this.dispatchEventAsync(new CustomEvent('timeupdate'));
+ },
pause: function() {
if (this._networkState === this.NETWORK.EMPTY)
this.gainNode.disconnect();
delete this.gainNode;
}
+
+ clearInterval(this.timeUpdateTimer);
},
onended: function() {