diff options
Diffstat (limited to 'web/share/js/kvm/stream.js')
-rw-r--r-- | web/share/js/kvm/stream.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/web/share/js/kvm/stream.js b/web/share/js/kvm/stream.js index 9aa77545..15a62194 100644 --- a/web/share/js/kvm/stream.js +++ b/web/share/js/kvm/stream.js @@ -508,17 +508,17 @@ export function Streamer() { if (state.streamer) { tools.el.setEnabled($("stream-quality-slider"), true); - __setIfChanged($("stream-quality-slider"), state.streamer.encoder.quality, __updateQualityValue); + tools.slider.setValue($("stream-quality-slider"), state.streamer.encoder.quality, __updateQualityValue); if (state.features.h264 && __janus_enabled) { __setMinMax($("stream-h264-bitrate-slider"), state.limits.h264_bitrate); tools.el.setEnabled($("stream-h264-bitrate-slider"), true); - __setIfChanged($("stream-h264-bitrate-slider"), state.streamer.h264.bitrate, __updateH264BitrateValue); + tools.slider.setValue($("stream-h264-bitrate-slider"), state.streamer.h264.bitrate, __updateH264BitrateValue); } __setMinMax($("stream-desired-fps-slider"), state.limits.desired_fps); tools.el.setEnabled($("stream-desired-fps-slider"), true); - __setIfChanged($("stream-desired-fps-slider"), state.streamer.source.desired_fps, __updateDesiredFpsValue); + tools.slider.setValue($("stream-desired-fps-slider"), state.streamer.source.desired_fps, __updateDesiredFpsValue); let resolution_str = __makeStringResolution(state.streamer.source.resolution); if (__makeStringResolution(__resolution) !== resolution_str) { @@ -597,13 +597,6 @@ export function Streamer() { el.max = limits.max; }; - var __setIfChanged = function(el, value, callback) { - if (el.value !== value) { - el.value = value; - callback(value); - } - }; - var __updateQualityValue = function(value) { $("stream-quality-value").innerHTML = `${value}%`; }; |