summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/cctv-control.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js
index da49ca2..c79346d 100644
--- a/js/cctv-control.js
+++ b/js/cctv-control.js
@@ -13,8 +13,8 @@
var cam = 0;
-var camHost = "172.22.80.56:8080";
-var controlHost = "172.22.80.56:8080";
+var camHost = "127.0.0.1:8080";
+var controlHost = "127.0.0.1:8080";
//create event which is triggered when DOM is ready
window.onDomReady = initReady;
@@ -32,7 +32,9 @@ function initReady(fn) {
function changeCam() {
var display = document.getElementById('screen');
if (cam <= 7 && cam >= 0) {
- display.innerHTML = '<img src="http://' + camHost + '/cam/' + cam + '/stream.mjpeg" />';
+ camDisplay = cam + 1;
+ display.innerHTML = '<p class="camnumber">' + camDisplay + '</p>';
+ display.innerHTML += '<img src="http://' + camHost + '/cam/' + cam + '/stream.mjpeg" />';
}
else {
display.innerHTML = '<img src="img/testbild.png" />';
@@ -43,7 +45,7 @@ function changeCam() {
function controlCam(direction) {
if (direction == "left" || direction == "right" || direction == "up" || direction == "down") {
var request = new XMLHttpRequest();
- request.open("get", "http://" + controlHost + "/cam/" + cam + "/control/" + direction + "left", false);
+ request.open("get", "http://" + controlHost + "/cam/" + cam + "/control/" + direction, false);
request.send();
return false;
}