diff options
author | Devaev Maxim <[email protected]> | 2018-12-04 10:19:10 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-12-04 10:19:10 +0300 |
commit | 4f901d2f78d51b9613e8a88f612653fa65b1e2dc (patch) | |
tree | 6c85c61b7253613ceba91f18845258b1ca345617 /web/js/kvm/stream.js | |
parent | a57e5cdaa92d6843057321e3b470c396a9e593a8 (diff) |
web: process default states
Diffstat (limited to 'web/js/kvm/stream.js')
-rw-r--r-- | web/js/kvm/stream.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/web/js/kvm/stream.js b/web/js/kvm/stream.js index 2133349a..01ded5bc 100644 --- a/web/js/kvm/stream.js +++ b/web/js/kvm/stream.js @@ -39,7 +39,7 @@ function Streamer() { /********************************************************************************/ self.setState = function(state) { - if (state.state) { + if (state && state.state) { var source = state.state.source; var stream = state.state.stream; @@ -82,7 +82,7 @@ function Streamer() { if (stream.clients_stat.hasOwnProperty(__client_id)) { __client_fps = stream.clients_stat[__client_id].fps; } else { - self.clearState(); + __clearState(); } if (!__prev) { @@ -110,11 +110,11 @@ function Streamer() { __updateStreamHeader(true); } else { - self.clearState(); + __clearState(); } }; - self.clearState = function() { + var __clearState = function() { tools.info("Stream: refreshing ..."); $("stream-image").className = "stream-image-inactive"; |