mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 09:10:30 +08:00
pretty cursor for stream
This commit is contained in:
parent
3228e49497
commit
b73705e275
@ -10,6 +10,7 @@
|
|||||||
height: 480px;
|
height: 480px;
|
||||||
border: 1px solid grey;
|
border: 1px solid grey;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
cursor: wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
.session-opened {
|
.session-opened {
|
||||||
|
|||||||
@ -167,14 +167,16 @@ function pollStreamer() {
|
|||||||
var http = new XMLHttpRequest();
|
var http = new XMLHttpRequest();
|
||||||
http.open("GET", "/streamer/?action=snapshot", true);
|
http.open("GET", "/streamer/?action=snapshot", true);
|
||||||
http.onreadystatechange = function() {
|
http.onreadystatechange = function() {
|
||||||
if (http.readyState == 2) {
|
if (http.readyState == 2 || http.readyState == 4) {
|
||||||
var status = http.status;
|
var status = http.status;
|
||||||
http.abort();
|
http.abort();
|
||||||
if (status != 200) {
|
if (status != 200) {
|
||||||
console.log("Refreshing streamer ...");
|
console.log("Refreshing streamer ...");
|
||||||
pollStreamer.last = false;
|
pollStreamer.last = false;
|
||||||
|
document.getElementById("stream-image").style.cursor = "wait";
|
||||||
} else if (!pollStreamer.last) {
|
} else if (!pollStreamer.last) {
|
||||||
__refreshStremaer();
|
__refreshStremaer();
|
||||||
|
document.getElementById("stream-image").style.cursor = "cell";
|
||||||
pollStreamer.last = true;
|
pollStreamer.last = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user