<object type="application/x-shockwave-flash" width="640" height="480" data="http://SIMBIKA-PC:8080/flashMJPEG.swf">
<param name="movie" value="http://SIMBIKA-PC:8080/flashMJPEG.swf?webcam=http://SIMBIKA-PC:8080/cam_1.jpg&refresh=50&connect=&offline=&transtype=Fade&bgcolor=#FFFFFF&txtcolor=#FFFFFF" />
<param name="FlashVars" value="webcam=http://SIMBIKA-PC:8080/cam_1.jpg&refresh=50&connect=&offline=&transtype=Fade&bgcolor=#FFFFFF&txtcolor=#FFFFFF" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="best" />
<param name="scale" value="noscale" />
<param name="salign" value="lt" />
<param name="wmode" value="opaque" />
</object>
Sabtu, 03 Mei 2014
NATIVE MJPEG
<img src="http://SIMBIKA-PC:8080/cam_1.cgi" class="webcam" id="webcam1" onmousedown="PTZMouseDown1(event)" width="640" height="480" alt="Live Stream" />
<script type="text/javascript">
<!--
currentCamera1= 1;
function PTZMouseDown1(e)
{
var IE = document.all?true:false;
var x,y;
var myx,myy;
var myifr = document.getElementById("_iframe-ptz");
tp = getElPos1();
myx = tp[0];
myy = tp[1];
if(IE){
x = event.clientX - myx + document.body.scrollLeft;
y = event.clientY - myy + document.body.scrollTop;
} else {
x = e.pageX - myx;
y = e.pageY - myy;
}
//alert(x + " :: " + y);
if (width_array[currentCamera1] > 0) x = Math.round((x * 400) / width_array[currentCamera1]);
if (height_array[currentCamera1] > 0) y = Math.round((y * 300) / height_array[currentCamera1]);
//alert(x + " :: " + y);
if (myifr != null) myifr.src = "http://SIMBIKA-PC:8080/ptz?src=" + currentCamera1 + "&moveto_x=" + x + "&moveto_y=" + y +"";
return true;
}
function getElPos1()
{
el = document.images.webcam1;
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);
}
//-->
</script>
<script type="text/javascript">
<!--
currentCamera1= 1;
function PTZMouseDown1(e)
{
var IE = document.all?true:false;
var x,y;
var myx,myy;
var myifr = document.getElementById("_iframe-ptz");
tp = getElPos1();
myx = tp[0];
myy = tp[1];
if(IE){
x = event.clientX - myx + document.body.scrollLeft;
y = event.clientY - myy + document.body.scrollTop;
} else {
x = e.pageX - myx;
y = e.pageY - myy;
}
//alert(x + " :: " + y);
if (width_array[currentCamera1] > 0) x = Math.round((x * 400) / width_array[currentCamera1]);
if (height_array[currentCamera1] > 0) y = Math.round((y * 300) / height_array[currentCamera1]);
//alert(x + " :: " + y);
if (myifr != null) myifr.src = "http://SIMBIKA-PC:8080/ptz?src=" + currentCamera1 + "&moveto_x=" + x + "&moveto_y=" + y +"";
return true;
}
function getElPos1()
{
el = document.images.webcam1;
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);
}
//-->
</script>
Langganan:
Postingan (Atom)