pcdemo.vue
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<template>
<div>
<!-- 添加视频测试 -->
<div>
<el-button type="primary" @click="addPlayer({gateUnid: '85de13a8-5775-11ee-94ed-00163e143ecd'})">河南分公司--办公室--办公室监控</el-button>
<el-button type="primary" @click="addPlayer({gateUnid: '85de1aec-5775-11ee-94ed-00163e143ecd',watermarkText:'Demo Store'})">Demo Store--客流相机-入口1</el-button>
</div>
<indexPlayer ref="iframe"></indexPlayer>
<!-- <iframe id="iframe" name="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);" src="/nvsdemo/#/jplayer-web" frameborder="0"></iframe> -->
<!-- <iframe id="iframe" name="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);" src="http://192.168.1.67:9091/#/vion-player-demo" frameborder="0"></iframe> -->
</div>
</template>
<script>
import indexPlayer from './index.vue';
export default {
name: 'jplayerWebDemo',
components: {
indexPlayer,
},
data() {
return {
}
},
created() {
console.log(window.JessibucaPro)
},
mounted() {
this.$refs.iframe.initWebVideo({
isShowTime:true,// 是否显示时间操作区,默认为true
height:'',// 设置组件高度
isShowJT:false,// 是否显示截图按钮,默认为false
isShowSplit:false,// 是否支持四分屏,默认为true
controlAutoHide:false,// 是否显示视频操作区,默认为true
showPtz:false,// 是否显示视频操作区中的云台控制,默认为true
})
},
methods: {
addPlayer(obj) {
// window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
this.$refs.iframe.playWebVideo(obj)
},
},
}
</script>
<style lang="scss" scoped>
</style>