How to use the xgplayer.Errors function in xgplayer

To help you get started, we’ve selected a few xgplayer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bytedance / xgplayer / packages / xgplayer-flv-vod / src / flv-vod.js View on Github external
this.loader.load(this._player.config.url).catch(() => {
      // 在尝试获取视频数据失败时,尝试使用直播方式加载整个视频
      this._player.emit('error', new Player.Errors('network', this._player.config.url))
    })
  }
github bytedance / xgplayer / packages / xgplayer-flv.js / src / index.js View on Github external
flv.on(Flv.Events.ERROR, (e) => {
      player.emit('error', new Player.Errors('other', player.config.url))
    })
github bytedance / xgplayer / packages / xgplayer-flv-live / src / flv-live-mobile.js View on Github external
_handleDemuxError () {
    this._player.emit('error', new Player.Errors('parse', this._player.config.url))
  }
github bytedance / xgplayer / packages / xgplayer-hls-vod / src / index.js View on Github external
this.__core__.once(HLS_EVENTS.RETRY_TIME_EXCEEDED, () => {
      this.emit('error', new Player.Errors('network', this.config.url))
    })
github bytedance / xgplayer / packages / xgplayer-flv-vod / src / flv-vod.js View on Github external
_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)
  }
github bytedance / xgplayer / packages / xgplayer-flv-vod / src / flv-vod.js View on Github external
_handleNetworkError (tag, err) {
    this._player.emit('error', new Player.Errors('network', this._player.config.url))
    this._onError(LOADER_EVENTS.LOADER_ERROR, tag, err, true)
  }
github bytedance / xgplayer / packages / xgplayer-flv-live / src / flv-live.js View on Github external
_handleNetworkError (tag, err) {
    this._player.emit('error', new Player.Errors('network', this._player.config.url))
    this._onError(LOADER_EVENTS.LOADER_ERROR, tag, err, true)
  }
github bytedance / xgplayer / packages / xgplayer-flv-live / src / flv-live.js View on Github external
_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)
  }
github bytedance / xgplayer / packages / xgplayer-flv-live / src / flv-live-mobile.js View on Github external
_handleNetworkError () {
    this._player.emit('error', new Player.Errors('network', this._player.config.url))
  }

xgplayer

video player

MIT
Latest version published 1 day ago

Package Health Score

84 / 100
Full package analysis