Commit 499a3e4d authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

updated for newer version of jquery-jp4.js

parent abcbbeef
...@@ -378,6 +378,7 @@ function requestsNextState(success) { ...@@ -378,6 +378,7 @@ function requestsNextState(success) {
gRequests.sendHttpReq(); /// Will trigger either requestsNextState(true) or requestsNextState(false) gRequests.sendHttpReq(); /// Will trigger either requestsNextState(true) or requestsNextState(false)
break; break;
case COMM_STATE_IMG: case COMM_STATE_IMG:
//console.log("Getting new image @ "+Date.now()/1000);
gRequests.getImage(); gRequests.getImage();
/// start image loading, onLoad/timeout should trigger either requestsNextState(true) or requestsNextState(false) /// start image loading, onLoad/timeout should trigger either requestsNextState(true) or requestsNextState(false)
break; break;
......
...@@ -599,10 +599,12 @@ camInterface.prototype.gotShadow=function() { ...@@ -599,10 +599,12 @@ camInterface.prototype.gotShadow=function() {
if (jp4obj!=undefined){ if (jp4obj!=undefined){
/*
var tmp = jp4obj.data.getAddr(); var tmp = jp4obj.data.getAddr();
if (img_port!=tmp[1]){ if (img_port!=tmp[1]){
jp4obj.data.setAddr(img_addr,img_port); jp4obj.data.setAddr(img_addr,img_port);
} }
*/
var format = jp4obj.data.getFormat(); var format = jp4obj.data.getFormat();
var format_note = document.getElementById("format_note"); var format_note = document.getElementById("format_note");
...@@ -625,7 +627,8 @@ camInterface.prototype.gotShadow=function() { ...@@ -625,7 +627,8 @@ camInterface.prototype.gotShadow=function() {
}else{ }else{
// this requires jquery // this requires jquery
jp4obj = $("#idCameraImage_div").jp4({ip:img_addr,port:img_port,width:document.getElementById("idDivCameraImage").offsetWidth,fast:true,lowres:1,note:true}); //jp4obj = $("#idCameraImage_div").jp4({ip:img_addr,port:img_port,width:document.getElementById("idDivCameraImage").offsetWidth,fast:true,lowres:1,note:true});
jp4obj = $("#idCameraImage_div").jp4({src:"http://"+img_addr+":"+img_port+"/img",width:document.getElementById("idDivCameraImage").offsetWidth,fast:true,lowres:1,note:true});
} }
document.getElementById("idImageLink").href= gRequests.shadowImage.src; document.getElementById("idImageLink").href= gRequests.shadowImage.src;
......
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