Commit 9d1a2b40 by Tianqing Liu

feat: 录像状态不展示云台控制

1 parent 5d3c6c84
<template>
<div ref="container" :class="containerClassName" ></div>
<div ref="container" :data-player-type="this.playerType" :class="containerClassName" ></div>
</template>
<script>
......@@ -44,6 +44,7 @@ export default {
playOriginUrl: '',
rotateNum: 0,
mirrorIndex: 0,
playerType: 'live', // 播放器类型:live playback
player: {
height: 0,
......@@ -53,7 +54,11 @@ export default {
},
computed: {
containerClassName() {
return this.hideControls ? ['vion-player', 'hide-controls'] : 'vion-player';
// 样式不支持响应式,因为会覆盖掉播放器自身添加的样式
const list = ['vion-player'];
if (this.hideControls) list.push('hide-controls');
// if (this.playerType === 'playback') list.push('playback-status');
return list;
},
},
mounted() {
......@@ -142,8 +147,10 @@ export default {
setTimeout(() => {
if (isPlayback) {
this._jessibuca.playback(url, getPlaybackConfig());
this.playerType = 'playback';
} else {
this._jessibuca.play(url);
this.playerType = 'live';
}
this.playOriginUrl = url;
}, 150);
......@@ -257,6 +264,12 @@ export default {
::v-deep(.jessibuca-control-progress-simple) {
display: none;
}
// 云台控制
&[data-player-type="playback"] {
::v-deep(.jessibuca-ptz) {
display: none !important;
}
}
}
.hide-controls {
::v-deep(.jessibuca-controls) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!