From e588ad4e7a90b62a27471a0a31257b05a28640da Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Wed, 23 Jul 2025 18:10:01 +0300 Subject: [PATCH] Support switching between Primary & Secondary streams (MonitorStream.js) To #4381 --- web/js/MonitorStream.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 419f0fde07..9a17e56b52 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -281,9 +281,11 @@ function MonitorStream(monitorData) { stream.background = true; // We do not use the document hiding/showing analysis from "video-rtc.js", because we have our own analysis const Go2RTCModUrl = url; const webrtcUrl = Go2RTCModUrl; + this.currentChannelStream = (streamChannel == 'default') ? 0 : streamChannel; webrtcUrl.protocol = (url.protocol=='https:') ? 'wss:' : 'ws'; webrtcUrl.pathname += "/ws"; - webrtcUrl.search = 'src='+this.id; + //webrtcUrl.search = 'src='+this.id; + webrtcUrl.search = 'src='+this.id+'_'+this.currentChannelStream; stream.src = webrtcUrl.href; const stream_container = old_stream.parentNode;