|
@@ -181,7 +181,8 @@ export default {
|
|
|
title: null,
|
|
|
rtsp: null,
|
|
|
ws: null,
|
|
|
- videoSize:'1366x768'
|
|
|
+ videoSize:'1366x768',
|
|
|
+ channel:0
|
|
|
},
|
|
|
player:null,
|
|
|
configItems: 2, // 配置项的通道配置项数
|
|
@@ -213,10 +214,13 @@ export default {
|
|
|
this.getTreeByCode(cameraCode);
|
|
|
console.log(this.wanIp,this.lanIp,this.loginIp)
|
|
|
// 初始化摄像头播放地址
|
|
|
- if(this.wanIp === this.loginIp)
|
|
|
- this.videoData.ws = "ws://"+this.lanIp+":8088/"
|
|
|
- else
|
|
|
- this.videoData.ws = "ws://"+this.wanIp+":8088/"
|
|
|
+ if(this.wanIp === this.loginIp) {
|
|
|
+ this.videoData.ws = "ws://" + this.lanIp + ":8088/"
|
|
|
+ this.videoData.channel=0
|
|
|
+ }else {
|
|
|
+ this.videoData.ws = "ws://" + this.wanIp + ":8088/"
|
|
|
+ this.videoData.channel=1
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(["fetch"]),
|
|
@@ -385,8 +389,8 @@ export default {
|
|
|
console.log(row);
|
|
|
if (row.meta.channel && row.meta.channel.length > 0) {
|
|
|
let channals = JSON.parse(row.meta.channel);
|
|
|
- let rtsp = channals[0].rtsp;
|
|
|
- let size = channals[0].size;//临时
|
|
|
+ let rtsp = channals[this.videoData.channel].rtsp;
|
|
|
+ let size = channals[this.videoData.channel].size;//临时
|
|
|
// console.log(rtsp)
|
|
|
this.videoData.title=row.name//标题
|
|
|
let url = this.videoData.ws+"?rtsp="+encodeURIComponent(rtsp.trim())+'&videoSize='+size.trim()
|