Ai
1 Star 0 Fork 0

DaTree/easy_wasm_player_demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
App.vue 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
DaTree 提交于 2021-11-12 16:34 +08:00 . 初步完成,可惜有性能问题
<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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/DaTree/easy_wasm_player_demo.git
git@gitee.com:DaTree/easy_wasm_player_demo.git
DaTree
easy_wasm_player_demo
easy_wasm_player_demo
master

搜索帮助