Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.loader.load(this._player.config.url).catch(() => {
// 在尝试获取视频数据失败时,尝试使用直播方式加载整个视频
this._player.emit('error', new Player.Errors('network', this._player.config.url))
})
}
flv.on(Flv.Events.ERROR, (e) => {
player.emit('error', new Player.Errors('other', player.config.url))
})
_handleDemuxError () {
this._player.emit('error', new Player.Errors('parse', this._player.config.url))
}
this.__core__.once(HLS_EVENTS.RETRY_TIME_EXCEEDED, () => {
this.emit('error', new Player.Errors('network', this.config.url))
})
_handleDemuxError (tag, err, fatal) {
if (fatal === undefined) {
fatal = false;
}
this._player.emit('error', new Player.Errors('parse', this._player.config.url))
this._onError(LOADER_EVENTS.LOADER_ERROR, tag, err, fatal)
}
_handleNetworkError (tag, err) {
this._player.emit('error', new Player.Errors('network', this._player.config.url))
this._onError(LOADER_EVENTS.LOADER_ERROR, tag, err, true)
}
_handleNetworkError (tag, err) {
this._player.emit('error', new Player.Errors('network', this._player.config.url))
this._onError(LOADER_EVENTS.LOADER_ERROR, tag, err, true)
}
_handleDemuxError (tag, err, fatal) {
if (fatal === undefined) {
fatal = false;
}
this._player.emit('error', new Player.Errors('parse', this._player.config.url))
this._onError(DEMUX_EVENTS.DEMUX_ERROR, tag, err, fatal)
}
_handleNetworkError () {
this._player.emit('error', new Player.Errors('network', this._player.config.url))
}