diff options
author | Florian <stayawake@lavabit.com> | 2014-02-16 00:51:37 +0100 |
---|---|---|
committer | Florian <stayawake@lavabit.com> | 2014-02-16 00:51:37 +0100 |
commit | 1adff22c4bd400991e22496f657746fb725fdbd1 (patch) | |
tree | 576082c5e479d54cd64e703cff143f25db55eb36 /js | |
parent | b69d61143ef7e0ef082406b654770409a743b173 (diff) |
bugfix: form active page reload and locally stored image is not
displayed
Diffstat (limited to 'js')
-rw-r--r-- | js/cctv-control.js | 5 |
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; |