pcdemo.vue
1.14 KB
<template>
<div>
<!-- 添加视频测试 -->
<div>
<el-button type="primary" @click="addPlayer({channelId: '20000000001310000008',address: '52.130.155.147'})">添加视频一</el-button>
<el-button type="primary" @click="addPlayer({channelId: '20000000001310000008',address: '52.130.155.147'})">添加视频二</el-button>
</div>
<iframe id="iframe" name="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);" src="/nvsdemo/#/jplayer-web" frameborder="0"></iframe>
<!-- <iframe name="iframe" ref="iframe" style="width: 100vw;height:calc(100vh - 60px);" src="http://192.168.1.117:8080/" frameborder="0"></iframe> -->
</div>
</template>
<script>
// import indexPlayer from './index.vue';
export default {
name: 'jplayerWebDemo',
components: {
// indexPlayer,
},
data() {
return {
}
},
created() {
},
methods: {
addPlayer(obj) {
// window.playWebVideo(obj)
window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
// document.getElementById('iframe').contentWindow.playWebVideo(obj);
},
},
}
</script>
<style lang="scss" scoped>
</style>