From a16143aae94415cee408f85f81bfda06bf934f26 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Tue, 5 Aug 2025 19:02:06 +0300 Subject: [PATCH] Fix: Check for existence of "this.webrtc" before checking "close" method (MonitorStream.js) In addition to #4407 Otherwise, there may be an error when switching start/stop quickly. --- web/js/MonitorStream.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index a5f4d04c52..ed3a1a2a50 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -549,7 +549,7 @@ function MonitorStream(monitorData) { console.warn(e); } } - if (close in this.webrtc) this.webrtc.close(); + if (this.webrtc && ('close' in this.webrtc)) this.webrtc.close(); this.webrtc = null; } else if (-1 !== this.activePlayer.indexOf('rtsp2web')) { if (this.webrtc) {