summaryrefslogtreecommitdiff
path: root/web/share/js/kvm/stream.js
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-11-08 02:08:56 +0300
committerDevaev Maxim <[email protected]>2019-11-08 02:08:56 +0300
commit7f1461371d561592a1445e6b0245d51ca2516761 (patch)
tree057ad775af452346068306f58258a9d2609e7b7b /web/share/js/kvm/stream.js
parent3c1681fd2bc43dffcc75b82760d3f068af97574c (diff)
refactoring
Diffstat (limited to 'web/share/js/kvm/stream.js')
-rw-r--r--web/share/js/kvm/stream.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js
index 8338805c..6ea3362e 100644
--- a/web/share/js/kvm/stream.js
+++ b/web/share/js/kvm/stream.js
@@ -72,7 +72,7 @@ export function Streamer() {
state = state.state;
if (!$("stream-quality-slider").activated) {
- wm.switchDisabled($("stream-quality-slider"), false);
+ wm.switchEnabled($("stream-quality-slider"), true);
if ($("stream-quality-slider").value !== state.encoder.quality) {
$("stream-quality-slider").value = state.encoder.quality;
__updateQualityValue(state.encoder.quality);
@@ -81,7 +81,7 @@ export function Streamer() {
if (!$("stream-desired-fps-slider").activated) {
$("stream-desired-fps-slider").max = max_fps;
- wm.switchDisabled($("stream-desired-fps-slider"), false);
+ wm.switchEnabled($("stream-desired-fps-slider"), true);
if ($("stream-desired-fps-slider").value !== state.source.desired_fps) {
$("stream-desired-fps-slider").value = state.source.desired_fps;
__updateDesiredFpsValue(state.source.desired_fps);
@@ -103,8 +103,8 @@ export function Streamer() {
if (__ensureStream(state.stream.clients_stat)) {
$("stream-led").className = "led-green";
$("stream-led").title = "Stream is active";
- wm.switchDisabled($("stream-screenshot-button"), false);
- wm.switchDisabled($("stream-reset-button"), false);
+ wm.switchEnabled($("stream-screenshot-button"), true);
+ wm.switchEnabled($("stream-reset-button"), true);
$("stream-quality-slider").activated = false;
$("stream-desired-fps-slider").activated = false;
tools.info("Stream: active");
@@ -115,10 +115,10 @@ export function Streamer() {
} else {
$("stream-led").className = "led-gray";
$("stream-led").title = "Stream inactive";
- wm.switchDisabled($("stream-screenshot-button"), true);
- wm.switchDisabled($("stream-reset-button"), true);
- wm.switchDisabled($("stream-quality-slider"), true);
- wm.switchDisabled($("stream-desired-fps-slider"), true);
+ wm.switchEnabled($("stream-screenshot-button"), false);
+ wm.switchEnabled($("stream-reset-button"), false);
+ wm.switchEnabled($("stream-quality-slider"), false);
+ wm.switchEnabled($("stream-desired-fps-slider"), false);
tools.info("Stream: inactive");
__updateStreamWindow(false, false);