|
@@ -1,17 +1,19 @@
|
|
|
<!-- 视频播放组件 -->
|
|
|
<template>
|
|
|
- <div class="vidoForBack">
|
|
|
+ <div class="vidoForBack" :class="vidoBackShow?'vidoBack':null">
|
|
|
<div class="VideoForHk" ref="playWndBox">
|
|
|
<div id="playWnd" class="playWnd" :style="{ height: playWndHeight + 'px', width: playWndWidth + 'px',
|
|
|
}"></div>
|
|
|
- <div class="vido_footer"><span @click="onCancelVideo()"></span></div>
|
|
|
+ <div class="vido_footer" v-if="vidoBackShow?true:false"><span @click="onCancelVideo()"></span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
- import {ref, onMounted, onBeforeUnmount,onBeforeMount, getCurrentInstance, nextTick, watch} from 'vue'
|
|
|
- const props = defineProps(['cameraIndexCode'])
|
|
|
+ import {ref, onMounted, onBeforeUnmount,onBeforeMount, getCurrentInstance, defineExpose, nextTick, watch} from 'vue'
|
|
|
+ const props = defineProps(['cameraIndexCode','vidoBackShow'])
|
|
|
const playWndBox = ref(null)
|
|
|
+
|
|
|
+ const vidoBackShow = ref(true)
|
|
|
let backMsg = ref('')
|
|
|
let playWndHeight = ref('')
|
|
|
let playWndWidth = ref('')
|
|
@@ -26,6 +28,7 @@
|
|
|
layout: "1x1", //页面展示的模块数【16】
|
|
|
})
|
|
|
onBeforeMount(() => {
|
|
|
+ vidoBackShow.value=props.vidoBackShow
|
|
|
// 初始化播放器插件
|
|
|
nextTick(() => {
|
|
|
initPlugin();
|
|
@@ -77,6 +80,21 @@
|
|
|
handleClose()
|
|
|
}
|
|
|
|
|
|
+ const onCancelVideoEx=()=>{
|
|
|
+ console.log('关闭调用到了')
|
|
|
+ // 先让窗口隐藏,规避可能的插件窗口滞后于浏览器消失问题
|
|
|
+ oWebControl.JS_HideWnd();
|
|
|
+ // 销毁当前播放的视频
|
|
|
+ oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
|
|
|
+ // 断开与插件服务连接
|
|
|
+ oWebControl.JS_Disconnect();
|
|
|
+ oWebControl.JS_RequestInterface({funcName: 'uninit'})
|
|
|
+ handleClose()
|
|
|
+ }
|
|
|
+
|
|
|
+ defineExpose({
|
|
|
+ onCancelVideoEx
|
|
|
+ })
|
|
|
|
|
|
const emit = defineEmits(['closeVido'])
|
|
|
|
|
@@ -213,7 +231,7 @@
|
|
|
encryptedFields: encryptedFields, //加密字段
|
|
|
showToolbar: showToolbar, //是否显示工具栏
|
|
|
showSmart: showSmart, //是否显示智能信息
|
|
|
- toolBarButtonIDs: "2048,2049,4098",
|
|
|
+ toolBarButtonIDs: vidoBackShow.value?"2048,2049,4098":'',
|
|
|
reconnectDuration: 5,
|
|
|
reconnectTimes: 5,
|
|
|
}),
|
|
@@ -280,6 +298,10 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ .vidoBack{
|
|
|
+ background-color: #000000;
|
|
|
+ opacity: 0.9;
|
|
|
+ }
|
|
|
.vidoForBack {
|
|
|
|
|
|
top: 0;
|
|
@@ -287,9 +309,7 @@
|
|
|
position: fixed;
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
- background-color: #000000;
|
|
|
- opacity: 0.9;
|
|
|
- z-index: 580;
|
|
|
+ z-index: 1;
|
|
|
|
|
|
.VideoForHk {
|
|
|
position: fixed;
|