<template>
  <div class="test">
    <Xgplayer ref="videoPlayer" :config="config"/>
  </div>
</template>

<script>
import Xgplayer from 'xgplayer-vue'

export default {
  data () {
    return {
      config: {
        id: 'vs',
        url: 'http://baobab.kaiyanapp.com/api/v1/playUrl?vid=139024&resourceType=video&editionType=default&source=aliyun&playUrlType=url_oss',
        'playsinline': true,
        'x5-video-player-type': 'h5',
        // 'autoplay': true,
        fluid: true,
        fitVideoSize: 'auto',
        controls: false,
        poster: 'http://img.kaiyanapp.com/f80bd3366e03580a8a82c9b8ad76c00c.png?imageMogr2/quality/60/format/jpg'
      }
    }
  },
  components: {
    Xgplayer
  }
}
</script>

<style lang="scss" scoped>
.test {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
</style>
