diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index c82ce6e1e..fe635d804 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -1784,7 +1784,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 @@ -1813,7 +1818,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 = ''; @@ -1914,7 +1924,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; 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 = ''; + } + } } },