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