'Player',
<template>
  <el-dialog
    append-to-body
    title="视频播放"
    :visible.sync="dialogFormVisible"
    width="50%"
    @close="close"
  >
    <el-card>
      <template #header>{{ video.media_name }}</template>
      <vab-player-mp4
        ref="player"
        :config="mp4Config"
        @player="$vabPlayerMp4 = $event"
      />
    </el-card>
    <div slot="footer" class="dialog-footer">
      <el-button @click="close">{{ __('关闭') }}</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import { translateTitle as __ } from '@/utils/i18n'
  import { VabPlayerMp4 } from '@/extra/VabPlayer.js'
  import { uuid } from '@/utils'
  export default {
    name: 'Player',
    components: {
      VabPlayerMp4,
    },
    data() {
      return {
        video: {},
        mp4Config: {
          id: '',
          url: '',
          volume: 0.6,
          autoplay: true,
          fluid: true,
          screenShot: false,
          pip: false,
        },
        $vabPlayerMp4: null,
        dialogFormVisible: false,
      }
    },
    created() {},
    methods: {
      __,
      showEdit(row) {
        this.video = row
        this.mp4Config.id = row.media_id
        this.mp4Config.url = row.media_url
        this.dialogFormVisible = true
      },
      close() {
        this.video = {}
        this.dialogFormVisible = false
      },
    },
  }
</script>
