pcdemo.vue 1.56 KB
<template>
  <div>
    <!-- 添加视频测试 -->
      <div>
				<el-button type="primary" @click="addPlayer({gateUnid: '7c55b448-5857-11ee-8777-00163e143ecd'})">会议室</el-button>
				<el-button type="primary" @click="addPlayer({gateUnid: '85de13a8-5775-11ee-94ed-00163e143ecd'})">办公室</el-button>
				<el-button type="primary" @click="addPlayer({gateUnid: '85de1326-5775-11ee-94ed-00163e143ecd'})">大华</el-button>
      </div>
			<indexPlayer id="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);"></indexPlayer>
			<!-- <iframe id="iframe" name="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);" src="/#/vionplayer-web" 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:true,// 是否支持四分屏,默认为true
			hideControls:true,// 是否显示视频操作区,默认为false
			showPtz:true,// 是否显示视频操作区中的云台控制,默认为true
		})
	},
  methods: {
    addPlayer(obj) {
			// window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
			
			this.$refs.iframe.playWebVideo(obj)
    },
  },
}
</script>
<style lang="scss" scoped>
</style>