summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian <stayawake@lavabit.com>2014-02-15 23:51:37 (GMT)
committerFlorian <stayawake@lavabit.com>2014-02-15 23:51:37 (GMT)
commit1adff22c4bd400991e22496f657746fb725fdbd1 (patch)
tree576082c5e479d54cd64e703cff143f25db55eb36
parentb69d61143ef7e0ef082406b654770409a743b173 (diff)
bugfix: form active page reload and locally stored image is not
displayed
-rw-r--r--js/cctv-control.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/cctv-control.js b/js/cctv-control.js
index a191752..9f71276 100644
--- a/js/cctv-control.js
+++ b/js/cctv-control.js
@@ -31,7 +31,7 @@ function initReady(fn) {
//hide the form, and switch on camera
function initViewer() {
-
+ var display = document.getElementById('screen');
var tempCam = parseInt(localStorage.getItem('cam'));
formActive = localStorage.getItem("formActive");
@@ -41,8 +41,9 @@ function initViewer() {
//if form was displayed, when page was reloaded, display form
if (formActive == 1) {
- showForm();
displayCamNumber();
+ display.innerHTML += '<img id="camImage" src="http://' + camHost + '/cam/' + cam + '/stream.mjpeg" />';
+ showForm();
}
else {
formActive == 0;