diff options
author | Maxim Devaev <[email protected]> | 2022-11-15 22:24:09 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-11-15 22:24:09 +0300 |
commit | 740a3315bd112a23944291bfec25eadd65803da0 (patch) | |
tree | 64c2a4151b3f87f28adb8095dcc6a1e91eb18a7a /web/share/js/kvm/stream.js | |
parent | 4c7ef5b28c4563ad2094b9c4dbb6648d58058104 (diff) |
improved slider set range
Diffstat (limited to 'web/share/js/kvm/stream.js')
-rw-r--r-- | web/share/js/kvm/stream.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 9a480187..d93401f5 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -592,14 +592,14 @@ export function Streamer() { tools.slider.setValue($("stream-quality-slider"), state.streamer.encoder.quality); if (state.features.h264 && __janus_enabled) { - __setValueAndLimits($("stream-h264-bitrate-slider"), state.streamer.h264.bitrate, state.limits.h264_bitrate); + __setLimitsAndValue($("stream-h264-bitrate-slider"), state.limits.h264_bitrate, state.streamer.h264.bitrate); tools.el.setEnabled($("stream-h264-bitrate-slider"), true); - __setValueAndLimits($("stream-h264-gop-slider"), state.streamer.h264.gop, state.limits.h264_gop); + __setLimitsAndValue($("stream-h264-gop-slider"), state.limits.h264_gop, state.streamer.h264.gop); tools.el.setEnabled($("stream-h264-gop-slider"), true); } - __setValueAndLimits($("stream-desired-fps-slider"), state.streamer.source.desired_fps, state.limits.desired_fps); + __setLimitsAndValue($("stream-desired-fps-slider"), state.limits.desired_fps, state.streamer.source.desired_fps); tools.el.setEnabled($("stream-desired-fps-slider"), true); let resolution_str = __makeStringResolution(state.streamer.source.resolution); @@ -675,10 +675,9 @@ export function Streamer() { el_grab.innerHTML = el_info.innerHTML = title; }; - var __setValueAndLimits = function(el, value, limits) { + var __setLimitsAndValue = function(el, limits, value) { + tools.slider.setRange(el, limits.min, limits.max); tools.slider.setValue(el, value); - el.min = limits.min; - el.max = limits.max; }; var __clickModeRadio = function() { |