When using ZMS, destroy VolumeSlider if it exists (MonitorStream.js)

This commit is contained in:
IgorA100
2026-02-05 00:30:00 +03:00
committed by GitHub
parent 534a9ef197
commit 62faabc5f0

View File

@@ -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
*/