Commit 4b9c13d7 authored by 张伯涛's avatar 张伯涛

视频监控模块代码合并

parent 067db927
......@@ -30,7 +30,7 @@
</div>
<!-- <div>
点击此处前往海康平台下载视频播放插件
</div> -->
</div> -->
</el-card>
<div class="videoPlayer" id="playWnd">
......@@ -96,7 +96,7 @@ var pubKey = '';
var playWnd_width = window.innerWidth - 200;
var playWnd_height = window.innerHeight - 220;
var oWebControl;
var videoIp;
var videoIp="218.69.97.198";;
var videoPort=1443;
const enterpriseId = ref(null);
enterpriseId.value = store.getters.getEnterpriseId();
......@@ -234,8 +234,8 @@ function visibleCascader(isshow) {
}
}
$(document).ready(function () {
initIp();//ip
$(document).ready(async function () {
await initIp();//ip
initPlugin();
$('#startPlay').click(
function () {
......@@ -327,7 +327,9 @@ function cbIntegrationCallBack(oData) {
//初始化ip
async function initIp(){
const res = await fetch('https://api.ipify.org?format=json');
var res;
try{
res = await fetch('https://api.ipify.org?format=json');
const data = await res.json();
var serverIP = data.ip;
if(serverIP === "111.160.132.74" || serverIP === "218.69.97.198"){
......@@ -335,11 +337,18 @@ async function initIp(){
}else{
videoIp="218.69.97.198";
}
}catch(e){
videoIp="218.69.97.198";
}
videoPort=1443;
}
//初始化插件
function init() {
getPubKey(function () {
console.log("ip:"+videoIp);
////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment