Commit 4cbda71c by Tianqing Liu

feat: 播放器显隐控制

1 parent 457834ca
<template>
<div class="j-player-demo">
<div class="player-content">
<!-- :play-url="playUrl" -->
<vion-player ref="vionPlayer"
<vion-player v-if="playerVisible"
ref="vionPlayer"
:type="playerType"
:play-url="playUrl"
:datetime-range="datetimeRange"
watermarkText="文安智能123"
@ptz-control="handlePtz"
......@@ -16,6 +17,7 @@
</div>
<!-- <button @click="handleLive">直播</button> -->
<!-- <button @click="handlePlayback">回放</button> -->
<button @click="handleShow">展示</button>
<button @click="handlePause">暂停</button>
<button @click="handleStop">停止</button>
<button @click="handleDestroy">销毁</button>
......@@ -41,6 +43,7 @@ export default {
playerType: 'live',
datetimeRange: [],
playerVisible: false,
dialogVisible: false,
base64Url: '',
......@@ -53,6 +56,9 @@ export default {
const url = this.playUrl;
this.$refs.vionPlayer.play(url);
},
handleShow() {
this.playerVisible = true;
},
handleLive() {
this.playerType = 'live';
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!