使用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="60%">
<div class="screenshots">
<p>{{ name }}</p>
</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) {
that.name = res.name
that.dialogVisible = true
})
},
}
}
</script>