Commit d3a46a9d by 李乾广

修改bug

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