Browse Source

增加萤石视频监控

master
yxt_djz 2 years ago
parent
commit
4dc711bc04
  1. 26
      base-ui/src/views/supervise/monitoringCenter/index.vue

26
base-ui/src/views/supervise/monitoringCenter/index.vue

@ -4,7 +4,7 @@
<div id="video-container" >
</div>
<div style="text-align:center;" >
<el-button type="primary" size="small" @click="togglePlay">{{ play ? '正在播放' : '停止' }}</el-button>
<el-button type="primary" size="small" @click="togglePlay">{{ play ? '播放' : '停止' }}</el-button>
<!-- <el-tooltip effect="dark" :content="play ? '正在播放' : '停止'" >
<i :class="play ? 'el-icon-video-pause' : 'el-icon-video-play'" @click="togglePlay" ></i>
</el-tooltip>-->
@ -34,7 +34,7 @@
token: '',
player: null,
enableZ:false, //
play: false //
play: true //
}
},
created(){
@ -48,7 +48,7 @@
url: 'ezopen://open.ys7.com/109860978/1.hd.live',
audio: 1, // 0 - 1 -
autoplay: true,
templete: "security",
templete: "simple",
header: ["capturePicture"],
footer: ['talk','fullScreen'],
width: 608,
@ -80,28 +80,34 @@
},*/
// /
togglePlay(){
if(!this.player) return;
// if(!this.player || !this.play) return;
switch (this.play) {
case true:
this.player.stop();
this.play = false;
break;
case false:
this.player.play();
this.play = true;
break;
case true:
this.player.stop();
this.play = false;
break;
default:
break;
}
},
//
isCapturePicture(){
if(!this.player || !this.play) return;
if(!this.player || !this.play) {
this.$message({ showClose: true, type: 'error', message: '视频停止播放不能截图' });
return;
}
this.player.capturePicture();
},
//
isFullScreen(){
if(!this.player || !this.play) return;
if(!this.player || !this.play) {
this.$message({ showClose: true, type: 'error', message: '视频停止播放不能全屏' });
return;
}
this.player.fullScreen();
}

Loading…
Cancel
Save