fix:更改监控设备端口号

This commit is contained in:
shijing 2024-04-11 14:49:43 +08:00
parent 1c4eb04604
commit d07bdb77d8
1 changed files with 111 additions and 97 deletions

View File

@ -1,106 +1,120 @@
<template>
<el-container>
<el-main>
<div class="about">
<div id="divPlugin" class="plugin"></div>
<el-button @click="Login" type="primary">登录</el-button>
<el-button @click="vShow" type="primary">预览</el-button>
<el-button @click="stopShow" type="warning">停止预览</el-button>
<el-button @click="logOut" type="warning">登出设备</el-button>
<el-button @click="breakdom" type="warning">销毁设备</el-button>
<el-button @click="init" type="warning">初始化设备</el-button>
</div>
</el-main>
</el-container>
<el-container>
<el-main>
<div class="about">
<div id="divPlugin" class="plugin"></div>
<el-button @click="Login" type="primary">登录</el-button>
<el-button @click="vShow" type="primary">预览</el-button>
<el-button @click="stopShow" type="warning">停止预览</el-button>
<el-button @click="logOut" type="warning">登出设备</el-button>
<el-button @click="breakdom" type="warning">销毁设备</el-button>
<el-button @click="init" type="warning">初始化设备</el-button>
</div>
</el-main>
</el-container>
</template>
<script>
import { ThinRenderTargetTexture } from 'babylonjs';
import { ThinRenderTargetTexture } from "babylonjs";
export default {
data() {
return {
isZh: true,
szIp: '192.168.1.64',
ipPort: '80',
username: 'admin',
password: '9093QQww',
iPrototocol: 1,//http:1:http2:https
}
},
mounted() {
let that = this;
that.init();
},
methods: {
init() {
// alert('init')
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
WebVideoCtrl.I_InitPlugin("divPlugin", 500, 500, {
iWndowType: 2,//N*N
bWndFull: true,//
cbInitPluginCompleted: function () {
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(() => {
WebVideoCtrl.I_CheckPluginVersion().then((bFlog) => {
if (bFlog) {
alert("插件版本有更新,请双击开发包里的HCWebSDKPlugin.exe升级")
}
});
}, () => {
alert("插件初始化失败,请确认是否安装插件,如果未安装,请请双击开发包里的HCWebSDKPlugin.exe安装")
})
}
})
},
Login() {
WebVideoCtrl.I_Login(this.szIp, this.iPrototocol, this.ipPort, this.username, this.password, {
async: true,
cgi: 1,
success: (xmlDoc) => {
console.log("登录成功", xmlDoc);
},
error: (xmlDoc) => {
console.log("登录失败", xmlDoc);
}
})
},
//
vShow() {
WebVideoCtrl.I_StartRealPlay(this.szIp + '_' + this.ipPort, {
success: () => {
console.log("预览成功");
}
})
},
//
stopShow() {
WebVideoCtrl.I_Stop({
iWndIndex: 1,//tingzhichuangkou
success: () => {
console.log("停止预览成功");
}
});
},
//
stopShowAll() {
WebVideoCtrl.I_StopAllPlay();
},
//
logOut() {
WebVideoCtrl.I_Logout(this.szIp + '_' + this.ipPort, {
})
},
//
breakdom() {
WebVideoCtrl.I_DestroyPlugin();
},
}
}
data() {
return {
isZh: true,
szIp: "192.168.1.65",
ipPort: "80",
username: "admin",
password: "9093QQww",
iPrototocol: 1, //http:1:http2:https
};
},
mounted() {
let that = this;
that.init();
},
methods: {
init() {
// alert('init')
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin");
WebVideoCtrl.I_InitPlugin("divPlugin", 500, 500, {
iWndowType: 2, //N*N
bWndFull: true, //
cbInitPluginCompleted: function () {
WebVideoCtrl.I_InsertOBJECTPlugin("divPlugin").then(
() => {
WebVideoCtrl.I_CheckPluginVersion().then(
(bFlog) => {
if (bFlog) {
alert(
"插件版本有更新,请双击开发包里的HCWebSDKPlugin.exe升级"
);
}
}
);
},
() => {
alert(
"插件初始化失败,请确认是否安装插件,如果未安装,请请双击开发包里的HCWebSDKPlugin.exe安装"
);
}
);
},
});
},
Login() {
WebVideoCtrl.I_Login(
this.szIp,
this.iPrototocol,
this.ipPort,
this.username,
this.password,
{
async: true,
cgi: 1,
success: (xmlDoc) => {
console.log("登录成功", xmlDoc);
},
error: (xmlDoc) => {
console.log("登录失败", xmlDoc);
},
}
);
},
//
vShow() {
WebVideoCtrl.I_StartRealPlay(this.szIp + "_" + this.ipPort, {
success: () => {
console.log("预览成功");
},
});
},
//
stopShow() {
WebVideoCtrl.I_Stop({
iWndIndex: 1, //tingzhichuangkou
success: () => {
console.log("停止预览成功");
},
});
},
//
stopShowAll() {
WebVideoCtrl.I_StopAllPlay();
},
//
logOut() {
WebVideoCtrl.I_Logout(this.szIp + "_" + this.ipPort, {});
},
//
breakdom() {
WebVideoCtrl.I_DestroyPlugin();
},
},
};
</script>
<style scoped>
.plugin {
width: 500px;
height: 500px;
/* background: #ffffff; */
width: 500px;
height: 500px;
/* background: #ffffff; */
}
</style>
</style>