Commit 8db59d84 by Tianqing Liu

feat: 隐藏播放条

1 parent 06dbda73
<template> <template>
<div class="vion-player" ref="container"></div> <div ref="container" :class="containerClassName" ></div>
</template> </template>
<script> <script>
...@@ -17,9 +17,9 @@ export default { ...@@ -17,9 +17,9 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
controlAutoHide: { hideControls: {
type: Boolean, type: Boolean,
default: true, default: false,
}, },
showPtz: { showPtz: {
type: Boolean, type: Boolean,
...@@ -38,6 +38,11 @@ export default { ...@@ -38,6 +38,11 @@ export default {
}, },
} }
}, },
computed: {
containerClassName() {
return this.hideControls ? ['vion-player', 'hide-controls'] : 'vion-player';
},
},
mounted() { mounted() {
this.init(this.playUrl); this.init(this.playUrl);
console.log('mounted', window.JessibucaPro.EVENTS); console.log('mounted', window.JessibucaPro.EVENTS);
...@@ -68,7 +73,7 @@ export default { ...@@ -68,7 +73,7 @@ export default {
// 按钮和界面 // 按钮和界面
loadingText: '加载中...', loadingText: '加载中...',
controlAutoHide: this.controlAutoHide, controlAutoHide: true,
supportDblclickFullscreen: false, supportDblclickFullscreen: false,
showBandwidth: false, // 显示网速 showBandwidth: false, // 显示网速
fullscreenWatermarkConfig: { fullscreenWatermarkConfig: {
...@@ -79,7 +84,7 @@ export default { ...@@ -79,7 +84,7 @@ export default {
screenshot: false, screenshot: false,
play: true, play: true,
audio: true, audio: true,
ptz: true, // 云台 ptz: this.showPtz, // 云台
zoom: true, zoom: true,
performance: true, performance: true,
quality: false, quality: false,
...@@ -228,4 +233,9 @@ export default { ...@@ -228,4 +233,9 @@ export default {
widows: 100%; widows: 100%;
background-color: rgba(13, 14, 27, 0.7); background-color: rgba(13, 14, 27, 0.7);
} }
.hide-controls {
::v-deep(.jessibuca-controls) {
display: none !important;
}
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!