From 62faabc5f0d045d5be9dca06f2d5efed1bfbbb49 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Thu, 5 Feb 2026 00:30:00 +0300 Subject: [PATCH] When using ZMS, destroy VolumeSlider if it exists (MonitorStream.js) --- web/js/MonitorStream.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 183fa1ccc..c0eecec14 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -571,6 +571,8 @@ function MonitorStream(monitorData) { const stream = this.element = this.replaceDOMElement(this.getElement(), 'img'); if (!stream) return; + this.destroyVolumeSlider(); + this.streamCmdTimer = clearTimeout(this.streamCmdTimer); // Step 1 make sure we are streaming instead of a static image if (stream.getAttribute('loading') == 'lazy') { @@ -989,6 +991,16 @@ function MonitorStream(monitorData) { } }; + this.destroyVolumeSlider = function() { + const volumeSlider = this.getVolumeSlider(); + const iconMute = this.getIconMute(); + if (volumeSlider) { + volumeSlider.innerText = ""; + } + if (iconMute) iconMute.innerText = ""; + if (volumeSlider && 'noUiSlider' in volumeSlider) volumeSlider.noUiSlider.destroy(); + } + /* * volume: on || off */