mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-31 01:51:53 +08:00
pretty cursor for stream
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user