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

Loading…
Cancel
Save