|
@@ -155,8 +155,8 @@ export default {
|
|
success: function (xmlDoc) {
|
|
success: function (xmlDoc) {
|
|
console.log("开始预览"); //不能删除
|
|
console.log("开始预览"); //不能删除
|
|
|
|
|
|
- // that.getChannelInfo();
|
|
|
|
- that.initPlay(Data, index);
|
|
|
|
|
|
+ let oChannels = that.getChannelInfo();
|
|
|
|
+ that.initPlay(Data, index,oChannels);
|
|
},
|
|
},
|
|
error: function () {
|
|
error: function () {
|
|
console.log("login error");
|
|
console.log("login error");
|
|
@@ -175,6 +175,7 @@ export default {
|
|
var oChannels = $(xmlDoc).find("VideoInputChannel");
|
|
var oChannels = $(xmlDoc).find("VideoInputChannel");
|
|
nAnalogChannel = oChannels.length;
|
|
nAnalogChannel = oChannels.length;
|
|
console.log("获取模拟通道成功!");
|
|
console.log("获取模拟通道成功!");
|
|
|
|
+ return oChannels
|
|
},
|
|
},
|
|
error: function () {
|
|
error: function () {
|
|
console.log("获取模拟通道失败!" + WebVideoCtrl.I_GetLastError());
|
|
console.log("获取模拟通道失败!" + WebVideoCtrl.I_GetLastError());
|
|
@@ -185,7 +186,7 @@ export default {
|
|
async: false,
|
|
async: false,
|
|
success: function (xmlDoc) {
|
|
success: function (xmlDoc) {
|
|
var oChannels = $(xmlDoc).find("InputProxyChannelStatus");
|
|
var oChannels = $(xmlDoc).find("InputProxyChannelStatus");
|
|
- that.initPlay();
|
|
|
|
|
|
+ return oChannels
|
|
},
|
|
},
|
|
error: function () {
|
|
error: function () {
|
|
WebVideoCtrl.I_GetLastError();
|
|
WebVideoCtrl.I_GetLastError();
|
|
@@ -197,6 +198,7 @@ export default {
|
|
async: false,
|
|
async: false,
|
|
success: function (xmlDoc) {
|
|
success: function (xmlDoc) {
|
|
var oChannels = $(xmlDoc).find("ZeroVideoChannel");
|
|
var oChannels = $(xmlDoc).find("ZeroVideoChannel");
|
|
|
|
+ return oChannels
|
|
},
|
|
},
|
|
error: function () {
|
|
error: function () {
|
|
console.log("获取零通道失败!" + WebVideoCtrl.I_GetLastError());
|
|
console.log("获取零通道失败!" + WebVideoCtrl.I_GetLastError());
|
|
@@ -204,13 +206,13 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//初始化视频,为了让用户进来就可以看到视频播放
|
|
//初始化视频,为了让用户进来就可以看到视频播放
|
|
- initPlay(data, index) {
|
|
|
|
|
|
+ initPlay(data, index,oChannels) {
|
|
let szIP = data.ip; //ip地址
|
|
let szIP = data.ip; //ip地址
|
|
//循环16次是因为插件分屏最大为4x4(可以根据情况而定)
|
|
//循环16次是因为插件分屏最大为4x4(可以根据情况而定)
|
|
|
|
|
|
WebVideoCtrl.I_StartRealPlay(szIP, {
|
|
WebVideoCtrl.I_StartRealPlay(szIP, {
|
|
iStreamType: 1,
|
|
iStreamType: 1,
|
|
- iChannelID: 1,
|
|
|
|
|
|
+ iChannelID: oChannels.id,//按格式修改下
|
|
iWndIndex: index,
|
|
iWndIndex: index,
|
|
});
|
|
});
|
|
},
|
|
},
|