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,
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

View File

@ -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()