Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_onPlayStart()
{
// Just in case the video has not received its can play even yet..
if (!this.valid)
{
this._onCanPlay();
}
if (!this._isAutoUpdating && this.autoUpdate)
{
Ticker.shared.add(this.update, this);
this._isAutoUpdating = true;
}
}
_onPlayStart()
{
// Just in case the video has not received its can play even yet..
if (!this.hasLoaded)
{
this._onCanPlay();
}
if (!this._isAutoUpdating && this.autoUpdate)
{
Ticker.shared.add(this.update, this, UPDATE_PRIORITY.HIGH);
this._isAutoUpdating = true;
}
}
_onPlayStart()
{
// Just in case the video has not received its can play even yet..
if (!this.valid)
{
this._onCanPlay();
}
if (!this._isAutoUpdating && this.autoUpdate)
{
Ticker.shared.add(this.update, this);
this._isAutoUpdating = true;
}
}
{
this.add(item);
}
// Get the items for upload from the display
if (this.queue.length)
{
if (done)
{
this.completes.push(done);
}
if (!this.ticking)
{
this.ticking = true;
Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
}
}
else if (done)
{
done();
}
}
{
this.ticking = false;
const completes = this.completes.slice(0);
this.completes.length = 0;
for (let i = 0, len = completes.length; i < len; i++)
{
completes[i]();
}
}
else
{
// if we are not finished, on the next rAF do this again
Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
}
}
this._source.onloadedmetadata = () => {
if (this._source)
{
this._source.currentTime = start;
this._source.onloadedmetadata = null;
this.emit("progress", start, this._duration);
Ticker.shared.add(this._onUpdate, this);
}
};
this._source.onended = this._onComplete.bind(this);
private set _enabled(enabled: boolean)
{
Ticker.shared.remove(this._updateListener, this);
if (enabled)
{
Ticker.shared.add(this._updateListener, this);
}
}
private set _enabled(enabled: boolean)
{
Ticker.shared.remove(this._updateListener, this);
if (enabled)
{
Ticker.shared.add(this._updateListener, this);
}
}
removeEvents()
{
if (!this.interactionDOMElement)
{
return;
}
Ticker.shared.remove(this.update, this);
if (window.navigator.msPointerEnabled)
{
this.interactionDOMElement.style['-ms-content-zooming'] = '';
this.interactionDOMElement.style['-ms-touch-action'] = '';
}
else if (this.supportsPointerEvents)
{
this.interactionDOMElement.style['touch-action'] = '';
}
if (this.supportsPointerEvents)
{
window.document.removeEventListener('pointermove', this.onPointerMove, true);
this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);
this.interactionDOMElement.removeEventListener('pointerleave', this.onPointerOut, true);
stop()
{
if (!this.playing)
{
return;
}
this.playing = false;
if (this._autoUpdate)
{
Ticker.shared.remove(this.update, this);
}
}