summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-10-04 22:30:38 +0300
committerDevaev Maxim <[email protected]>2018-10-04 22:30:38 +0300
commit0d8325bcf703b186831c495e0768a7965edbd523 (patch)
tree363dc8bf6876fa9f20561bad4e5d4afbc2a00b11
parent7ffeb1c546d71e74b8074dd8cc03b49b23815c29 (diff)
added stream info to window head
-rw-r--r--web/js/stream.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/js/stream.js b/web/js/stream.js
index 71f0345b..30d643e5 100644
--- a/web/js/stream.js
+++ b/web/js/stream.js
@@ -48,6 +48,7 @@ function Stream() {
$("stream-screenshot-button").disabled = true;
$("stream-quality-select").disabled = true;
$("stream-reset-button").disabled = true;
+ __updateStreamHeader(false);
} else if (http.status === 200) {
if (__prev_state) {
if (__normal_size != response.stream.resolution) {
@@ -66,12 +67,22 @@ function Stream() {
$("stream-quality-select").disabled = false;
$("stream-reset-button").disabled = false;
}
+ __updateStreamHeader(true);
}
}
});
setTimeout(__startPoller, 1000);
};
+ var __updateStreamHeader = function(online) {
+ var el_grab = document.querySelector("#stream-window-header .window-grab");
+ if (online) {
+ el_grab.innerHTML = "Stream &ndash; " + __normal_size.width + "x" + __normal_size.height;
+ } else {
+ el_grab.innerHTML = "Stream &ndash; offline";
+ }
+ };
+
var __clickScreenshotButton = function() {
var el_a = document.createElement("a");
el_a.href = "/streamer/snapshot";