fix substream end event signal

master^2
Moe 2024-10-27 17:27:37 -07:00
parent 5d593f3d84
commit 91e240e1cf
2 changed files with 3 additions and 2 deletions

View File

@ -293,7 +293,7 @@ module.exports = (s,config,lang) => {
mid: activeMonitor.mid, mid: activeMonitor.mid,
ke: activeMonitor.ke, ke: activeMonitor.ke,
channel: activeMonitor.subStreamChannel channel: activeMonitor.subStreamChannel
},'GRP_'+activeMonitor.mid); },'GRP_'+activeMonitor.ke);
} }
const spawnSubstreamProcess = function(e){ const spawnSubstreamProcess = function(e){
// e = monitorConfig // e = monitorConfig
@ -425,6 +425,7 @@ module.exports = (s,config,lang) => {
activeMonitor.subStreamProcessClosing = false activeMonitor.subStreamProcessClosing = false
} }
}catch(err){ }catch(err){
console.error(err)
s.debugLog('destroySubstreamProcess',err) s.debugLog('destroySubstreamProcess',err)
} }
return response return response

View File

@ -223,7 +223,7 @@ function toggleSubStream(monitorId,callback){
} }
if(monitor.subStreamToggleLock)return false; if(monitor.subStreamToggleLock)return false;
monitor.subStreamToggleLock = true 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 monitor.subStreamToggleLock = false
debugLog(d) debugLog(d)
if(callback)callback() if(callback)callback()