Commit d3a46a9d by 李乾广

修改bug

1 parent b7e1d463
......@@ -35,8 +35,8 @@ const routes = [
component: () => import('../views/player/vionPlayerDemo.vue')
},
{
path: '/jplayer-extension',
name: 'jplayerExtension',
path: '/vionplayer-extension',
name: 'vionplayerExtension',
component: () => import('../views/extension/index.vue')
},
/* {
......@@ -45,13 +45,13 @@ const routes = [
component: () => import('../views/ElTableDemo.vue')
}, */
{
path: '/jplayer-web',
name: 'jplayerWeb',
path: '/vionplayer-web',
name: 'vionplayerWeb',
component: () => import('../views/pc/index.vue')
},
{
path: '/jplayer-web-demo',
name: 'jplayerWebDemo',
path: '/vionplayer-web-demo',
name: 'vionplayerWebDemo',
component: () => import('../views/pc/pcdemo.vue')
}
]
......
......@@ -59,7 +59,7 @@ export default {
}
},
created() {
this.init();
// this.init();
},
methods: {
// 时间线改变
......@@ -98,18 +98,16 @@ export default {
}
},
init() {
// 通过URL获取相关参数
const urlParamsMap = getUrlParams(window.location.hash);
console.log('urlParamsMap', urlParamsMap);
Object.keys(this.params).forEach(key => {
if (urlParamsMap[key]) {
this.params[key] = urlParamsMap[key];
}
});
if (!this.params.gateUnid) {
console.error('传递URL参数有误,请确认 address 和 channelId 是否正确。');
}
playWebVideo(obj) {
// // 通过URL获取相关参数
// const urlParamsMap = getUrlParams(window.location.hash);
// console.log('urlParamsMap', urlParamsMap);
// Object.keys(this.params).forEach(key => {
// if (urlParamsMap[key]) {
// this.params[key] = urlParamsMap[key];
// }
// });
this.params = obj
this.getVideoAddress()
},
// 获取视频播放地址
......
......@@ -2,20 +2,17 @@
<div>
<!-- 添加视频测试 -->
<div>
<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',watermarkText:'Demo Store'})">Demo Store--客流相机-入口1</el-button>
<el-button type="primary" @click="addPlayer({gateUnid: '7c55b448-5857-11ee-8777-00163e143ecd'})">办公室</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> -->
<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';
// import indexPlayer from './index.vue';
export default {
name: 'jplayerWebDemo',
components: {
indexPlayer,
// indexPlayer,
},
data() {
return {
......@@ -30,15 +27,15 @@ export default {
height:'',// 设置组件高度
isShowJT:false,// 是否显示截图按钮,默认为false
isShowSplit:true,// 是否支持四分屏,默认为true
hideControls:false,// 是否显示视频操作区,默认为false
hideControls:true,// 是否显示视频操作区,默认为false
showPtz:true,// 是否显示视频操作区中的云台控制,默认为true
})
},
methods: {
addPlayer(obj) {
// window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
this.$refs.iframe.playWebVideo(obj)
// this.$refs.iframe.playWebVideo(obj)
},
},
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!