vue2 XixunPlayer 查询播放器当前正在播放的节目名

vue yekong

使用vue开发实现XixunPlayer的功能.

XixunPlayer 查询播放器当前正在播放的节目名

/**
* @Author: 858834013@qq.com
* @Name: getPlayingProgram
* @Date: 2022-04-26
* @Desc: XixunPlayer 查询播放器当前正在播放的节目名
*/
<template>
  <div>
    <el-button class="mb20" @click="getdata" size="mini" type="primary">查询播放名</el-button>
    <el-dialog
      title="查询播放器当前正在播放的节目名"
      :visible.sync="dialogVisible"
      width="30%">
      <div class="screenshots">
        {{ name }}
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getdata } from '@/api/led/led'

export default {
  name: 'getPlayingProgram',
  components: {},
  data () {
    return {
      dialogVisible: false,
      name: ''
    }
  },
  props: {
    id: {
      type: String,
      default () {
        return ''
      }
    }
  },
  methods: {
    getdata () {
      var that = this
      getdata(that.id, {
        type: 'getPlayingProgram'
      }).then(function (res) {
        console.log(res)
        that.name = res.name
        that.dialogVisible = true
      })
    },
  }
}
</script>

喜欢