diff options
author | Devaev Maxim <[email protected]> | 2020-07-13 04:10:26 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-07-14 09:04:52 +0300 |
commit | 77f3dab55c52859490619825ace4620a5d134901 (patch) | |
tree | 90ac48b6cb5108543f9f3bad423c8a05de0e1ace /web | |
parent | 07fb731b215a560bdc0a89a1fd5c199d910034a3 (diff) |
optional quality and resolution
Diffstat (limited to 'web')
-rw-r--r-- | web/kvm/index.html | 12 | ||||
-rw-r--r-- | web/share/js/kvm/stream.js | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/web/kvm/index.html b/web/kvm/index.html index 17959783..5ff339b4 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -142,11 +142,13 @@ <button data-force-hide-menu id="show-keyboard-button">• Show keyboard</button> <button data-force-hide-menu id="show-about-button">• Show about</button> </div> - <hr> - <div class="menu-item-content-text"> - Stream quality: <span id="stream-quality-value">80%</span> - <div class="stream-slider-box"> - <input disabled type="range" id="stream-quality-slider" class="slider" /> + <div id="stream-quality" class="feature-disabled"> + <hr> + <div class="menu-item-content-text"> + Stream quality: <span id="stream-quality-value">80%</span> + <div class="stream-slider-box"> + <input disabled type="range" id="stream-quality-slider" class="slider" /> + </div> </div> </div> <hr> diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 7ea7d722..80832c7f 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -67,6 +67,10 @@ export function Streamer() { /************************************************************************/ self.setState = function(state) { + if (state) { + tools.setFeatureEnabled($("stream-quality"), state.features.quality && (state.state === null || state.state.encoder.quality > 0)); + } + if (state && state.state) { let max_fps = state.limits.max_fps; state = state.state; |