video steaming

var height_array = new Array();
var width_array = new Array();
width_array[2] = 320;
height_array[2] = 240;

Live Stream

0)) x = Math.round((x * 400) / width_array[currentCamera2]);
if ((height_array[currentCamera2] != null) && (height_array[currentCamera2] > 0)) y = Math.round((y * 300) / height_array[currentCamera2]);
if (x > 400) x = 400;
if (y > 300) y = 300;
if (myifr != null) myifr.src = “http://192.168.1.104:8080/ptz?src=” + currentCamera2 + “&moveto_x=” + x + “&moveto_y=” + y +””;
return true;
}
function getElPos2()
{
el = document.images.webcam2;
x = el.offsetLeft;
y = el.offsetTop;
elp = el.offsetParent;
while(elp!=null)
{ x+=elp.offsetLeft;
y+=elp.offsetTop;
elp=elp.offsetParent;
}
return new Array(x,y);
}
function ErrorImage2()
{
errorimg2++;
if (errorimg2>3){
document.images.webcam2.onload = “”;
document.images.webcam2.onerror = “”;
document.images.webcam2.src = “offline.jpg”;
}else{
uniq2 = Math.random();
document.images.webcam2.src = “http://192.168.1.104:8080/cam_” + currentCamera2 + “.jpg?uniq=”+uniq2;
}
}
function DoIt2()
{
errorimg2=0;
window.setTimeout(“LoadImage2();”, 40);
}
//–>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: