mirror of http://git.sublab.org/cctv-control/
added localstorage test file
This commit is contained in:
parent
e75c7a5cb2
commit
c7c87eccc2
2
cam.html
2
cam.html
|
@ -7,7 +7,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body onkeydown="keyDown(event)">
|
<body onkeydown="keyDown(event)">
|
||||||
<div id="screen">
|
<div id="screen">
|
||||||
<img src="img/testbild.gif" class="fullscreen">
|
<img src="img/testbild.gif" id="camImage">
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
// 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
|
||||||
|
|
||||||
|
|
||||||
|
window.onDomReady = initReady;
|
||||||
|
|
||||||
|
|
||||||
|
window.onDomReady(loadImg);
|
||||||
|
|
||||||
|
|
||||||
|
function initReady(fn) {
|
||||||
|
if(document.addEventListener) {
|
||||||
|
document.addEventListener("DOMContentLoaded", fn, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function loadImg() {
|
||||||
|
|
||||||
|
var display = document.getElementById("storImage"),
|
||||||
|
stor = localStorage.getItem("snapShot")
|
||||||
|
|
||||||
|
if (stor) {
|
||||||
|
display.setAttribute("src", stor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue