mirror of http://git.sublab.org/cctv-control/
bugfix: form active page reload and locally stored image is not
displayed
This commit is contained in:
parent
b69d61143e
commit
1adff22c4b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue