From 9bcb42c9d0edc8bf82e7398de1f7ead69e7bd4a3 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Mon, 27 Jul 2026 12:28:07 +0300 Subject: [PATCH 1/2] Stop processing the selected player if the video stream DOM element for the monitor is not found. This will prevent errors from appearing in the browser console. This can happen when quickly switching between monitors on the Watch page. --- web/js/MonitorStream.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 8655cb779..14582d5c4 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -1763,7 +1763,12 @@ function MonitorStream(monitorData) { stream.mode = this.player.substring(this.player.indexOf('_')+1); } const video_el = this.getAVStream(); - if (video_el) video_el.muted = this.muted; + if (video_el) { + video_el.muted = this.muted; + } else { + console.warn(`go2rtc DOM element of video stream for monitor with ID=${this.id} not found`); + return; + } this.handlerEventListenerStream(video_el); clearInterval(this.statusCmdTimer); // Fix for issues in Chromium when quickly hiding/showing a page. Doesn't clear statusCmdTimer when minimizing a page https://stackoverflow.com/questions/9501813/clearinterval-not-working @@ -1791,7 +1796,12 @@ function MonitorStream(monitorData) { const rtsp2webModUrl = url; const video_el = this.getAVStream(); - if (video_el) video_el.muted = this.muted; + if (video_el) { + video_el.muted = this.muted; + } else { + console.warn(`rtsp2web DOM element of video stream for monitor with ID=${this.id} not found`); + return; + } this.handlerEventListenerStream(video_el); rtsp2webModUrl.username = ''; rtsp2webModUrl.password = ''; @@ -1891,7 +1901,12 @@ function MonitorStream(monitorData) { stream.setAttribute("autoplay", ""); stream.setAttribute("muted", this.muted); const video_el = this.getAVStream(); - if (video_el) video_el.muted = this.muted; + if (video_el) { + video_el.muted = this.muted; + } else { + console.warn(`janus DOM element of video stream for monitor with ID=${this.id} not found`); + return; + } this.handlerEventListenerStream(video_el); if (ZM_JANUS_PATH) { server = ZM_JANUS_PATH; From d6f6ce7649f825106f6234ab24fa9b4113d1a0e1 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Mon, 27 Jul 2026 15:44:38 +0300 Subject: [PATCH 2/2] Fix: PanZoom. When scale = 1 and Ctrl, Alt, or Shift is pressed, prevent the player from responding to image clicks. on Event page (panzoom.js) In addition to #4651 This will allow the image to be zoomed when using the "Shift + Left-Click" combination when scale = 1 without stopping or starting playback. --- web/js/panzoom.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/js/panzoom.js b/web/js/panzoom.js index ff3ea5f76..aac4d78e0 100644 --- a/web/js/panzoom.js +++ b/web/js/panzoom.js @@ -261,7 +261,13 @@ var zmPanZoom = { if (videoJs) videoJs.style.pointerEvents = 'none'; } else { this.panZoom[id].setOptions({handleStartEvent: (event) => {}}); - if (videoJs) videoJs.style.pointerEvents = ''; + if (videoJs) { + if (this.shifted || this.ctrled || this.alted) { + videoJs.style.pointerEvents = 'none'; + } else { + videoJs.style.pointerEvents = ''; + } + } } },