
addCameraList(addCamera) {
let domain = null;
if (!addCamera || !addCamera.length) {
this.cameraList.forEach((vo, idx) => {
this.removeScreenCamera(idx);
});
this.cameraList = [];
return false;
}
if (this.cameraList.length >= this.size) {
this.$message.info("超过分屏数量限制!");
在这我想写如果超出限制,新打开视频替换已打开的视频。不知道该怎么写
}
if (this.cameraList.indexOf(addCamera[0]) >= 0) {
this.$message.info("视频已存在!");
return false;
}
this.cameraList.push(addCamera[0]);
this.$forceUpdate();
this.$nextTick(() => {
this.cameraPlay(this.cameraList.length - 1, addCamera[0]);
});
},