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.valid)
{
this._onCanPlay();
}
if (!this._isAutoUpdating && this.autoUpdate)
{
Ticker.shared.add(this.update, this);
this._isAutoUpdating = true;
}
}
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);
}
}