summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-07-13 08:19:43 +0000
committerDevaev Maxim <[email protected]>2018-07-13 08:19:43 +0000
commitb73705e275d0f7abe1dd530cf480f2ccad9ea1cc (patch)
tree84fc1d728d13eb28aa80b1b9164e74d95f6b2883 /kvmd
parent3228e49497c5e83f063b05b4facd080470857084 (diff)
pretty cursor for stream
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/web/css/main.css19
-rw-r--r--kvmd/web/js/kvmd.js4
2 files changed, 13 insertions, 10 deletions
diff --git a/kvmd/web/css/main.css b/kvmd/web/css/main.css
index 832a3645..bb26f3cf 100644
--- a/kvmd/web/css/main.css
+++ b/kvmd/web/css/main.css
@@ -1,15 +1,16 @@
.stream-box {
- box-sizing: border-box;
- display: inline-block;
- background-color: #e5e5f5;
- padding: 1em;
- text-align: left;
+ box-sizing: border-box;
+ display: inline-block;
+ background-color: #e5e5f5;
+ padding: 1em;
+ text-align: left;
}
.stream-box .stream-image {
- width: 640px;
- height: 480px;
- border: 1px solid grey;
- display: inline-block;
+ width: 640px;
+ height: 480px;
+ border: 1px solid grey;
+ display: inline-block;
+ cursor: wait;
}
.session-opened {
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;
}
}