// CCTV Control // // Author: Florian Raemisch // Email: olf@subsignal.org // // cctv-control is a webinterface to control and view // mjpeg encoded videos by cctv cameras which are // proxied by mjpegplexer. camera control is possible // with arrow-keys, if mjpegplexer is configured // properly. // // This Software is licensed under the GPL Version 3, 29 June 2007 var cam = 0; 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; //change from testbild to default cam when DOM is ready window.onDomReady(changeCam); function initReady(fn) { if(document.addEventListener) { document.addEventListener("DOMContentLoaded", fn, false); } } //change currently displayed camera to the one in cam variable function changeCam() { var display = document.getElementById('screen'); if (cam <= 7 && cam >= 0) { camDisplay = cam + 1; display.innerHTML = '
' + camDisplay + '
'; display.innerHTML += '