From 91e240e1cf9f716f5af243fe7b7099505b407b77 Mon Sep 17 00:00:00 2001 From: Moe Date: Sun, 27 Oct 2024 17:27:37 -0700 Subject: [PATCH] fix substream end event signal --- libs/monitor/utils.js | 3 ++- web/assets/js/bs5.monitorsUtils.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/monitor/utils.js b/libs/monitor/utils.js index d14ecd33..1b38671c 100644 --- a/libs/monitor/utils.js +++ b/libs/monitor/utils.js @@ -293,7 +293,7 @@ module.exports = (s,config,lang) => { mid: activeMonitor.mid, ke: activeMonitor.ke, channel: activeMonitor.subStreamChannel - },'GRP_'+activeMonitor.mid); + },'GRP_'+activeMonitor.ke); } const spawnSubstreamProcess = function(e){ // e = monitorConfig @@ -425,6 +425,7 @@ module.exports = (s,config,lang) => { activeMonitor.subStreamProcessClosing = false } }catch(err){ + console.error(err) s.debugLog('destroySubstreamProcess',err) } return response diff --git a/web/assets/js/bs5.monitorsUtils.js b/web/assets/js/bs5.monitorsUtils.js index cf104b05..00f2509c 100644 --- a/web/assets/js/bs5.monitorsUtils.js +++ b/web/assets/js/bs5.monitorsUtils.js @@ -223,7 +223,7 @@ function toggleSubStream(monitorId,callback){ } if(monitor.subStreamToggleLock)return false; monitor.subStreamToggleLock = true - $.getJSON(getApiPrefix() + '/toggleSubstream/'+$user.ke+'/'+monitorId,function(d){ + $.getJSON(getApiPrefix() + '/toggleSubstream/'+$user.ke+'/'+monitorId + (monitor.subStreamActive ? '?action=stop' : ''),function(d){ monitor.subStreamToggleLock = false debugLog(d) if(callback)callback()