summaryrefslogtreecommitdiff
path: root/web/js/kvm/stream.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/js/kvm/stream.js')
-rw-r--r--web/js/kvm/stream.js8
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";