pcdemo.vue 1.66 KB
<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>