mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
pretty cursor for stream
This commit is contained in:
parent
3228e49497
commit
b73705e275
@ -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 {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user