Commit 4efe85bd by yangliang

修改因为浏览器版本高获取水印IP显示异常的问题

parent c60a4133
......@@ -140,7 +140,11 @@ function getNowFormatDate() {
return currentdate;
}
var getIP_flag = false;
function getIPs(callback){
try{
var ip_dups = {};
//compatibility for firefox and chrome
var RTCPeerConnection = window.RTCPeerConnection
......@@ -213,16 +217,26 @@ function getIPs(callback){
if(line.indexOf('a=candidate:') === 0)
handleCandidate(line);
});
}, 1000);
}, 500);
}catch (e) {
//getSy("");
}finally{
setTimeout(function(){
if(!getIP_flag){
getSy(iptemp);
}
}, 1000);
}
}
//insert IP addresses into the page
var iptemp = "";
getIPs(function(ip){
debugger;
var ips = $('#clentip').val();
//alert("ips="+ips +"------ip="+ip);
if(ip!=null&&ip!=""){
if(ip!=null&&ip!=""&&ip!=undefined&&ip!="undefined"){
iptemp = ip;
}
getIP_flag = true;
getSy(iptemp);
});
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