How to use the xgplayer 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-react / src / xgplayer-react.js View on Github external
init(props) {
    const { playerInit } = props;
    if (props.config.url && props.config.url !== '') {
      props.config.ignores = props.config.ignores ? props.config.ignores.concat(['mp4player', 'hlsplayer']) : ['mp4player', 'hlsplayer'];

      props.config.ignores = props.config.ignores.concat(['backward', 'cover', 'forward', 'meta', 'next', 'prev']);
      player = new Player(props.config) || {};
      player.once('ready', () => { this.props.readyHandle(); });
      player.once('complete', () => { this.props.completeHandle(); });
      player.once('destroy', () => { this.props.destroyHandle(); });
      playerInit && props.playerInit(player);
    }
  }
github bytedance / xgplayer-vue / src / xgplayer-vue.vue View on Github external
init() {
      let self = this;
      if (this.config.url && this.config.url !== '') {
        this.player = new Player(this.config);
        this.$emit('player', this.player)
      }
    }
  },

xgplayer

video player

MIT
Latest version published 23 days ago

Package Health Score

84 / 100
Full package analysis