代码拉取完成,页面将自动刷新
<template>
<!-- <JessibucaDemo /> -->
<div class="warp">
<div class="left">
<button @click="handleOpenChannel(1)">打开通道1</button>
<button @click="handleOpenChannel(2)">打开通道2</button>
<button @click="handleOpenChannel(3)">打开通道3</button>
</div>
<div class="right">
<VideoPlayerPlatform ref="playerPlayform" />
</div>
</div>
</template>
<script>
// import JessibucaDemo from './components/JessibucaDemo.vue'
import VideoPlayerPlatform from './components/videoPlayerPlatform'
export default {
name: 'App',
components: {
// JessibucaDemo,
VideoPlayerPlatform
},
mounted () {
console.log(this.$refs.playerPlayform)
},
methods: {
handleOpenChannel (id) {
this.$refs.playerPlayform.openChannel({ deviceName: '1号机', deviceId: 'dev_0000001', channelId: 'c_000000'+id });
},
handleCloseChannel () {
this.$refs.playerPlayform.closeChannel({ deviceName: '1号机', deviceId: 'dev_0000001', channelId: 'c_0000001' });
}
}
}
</script>
<style lang="scss" scoped>
.warp {
display: flex;
height: 100%;
width: 100%;
.left {
width: 200px; //设备树
height: 100%;
}
.right {
flex: 1;
height: 100%;
width: 100%;
}
}
</style>
<style>
html,
body,
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
</style>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。