diff options
Diffstat (limited to 'kvmd/web/js/kvmd.js')
-rw-r--r-- | kvmd/web/js/kvmd.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/web/js/kvmd.js b/kvmd/web/js/kvmd.js index ce4f6acf..506e6aa5 100644 --- a/kvmd/web/js/kvmd.js +++ b/kvmd/web/js/kvmd.js @@ -167,14 +167,16 @@ function pollStreamer() { var http = new XMLHttpRequest(); http.open("GET", "/streamer/?action=snapshot", true); http.onreadystatechange = function() { - if (http.readyState == 2) { + if (http.readyState == 2 || http.readyState == 4) { var status = http.status; http.abort(); if (status != 200) { console.log("Refreshing streamer ..."); pollStreamer.last = false; + document.getElementById("stream-image").style.cursor = "wait"; } else if (!pollStreamer.last) { __refreshStremaer(); + document.getElementById("stream-image").style.cursor = "cell"; pollStreamer.last = true; } } |