run finalize action on event based recording on exit of record process

montage-api
Moe 2022-01-20 13:02:36 -08:00
parent e6e9060de4
commit d2d46f0795
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ module.exports = (s,config,lang,app,io) => {
const filename = `${fileTime}.mp4`
response.filename = `${filename}`
response.filePath = `${recordingDirectory}${filename}`
eventBasedRecording.process.on('close',function(){
eventBasedRecording.process.on('exit',function(){
setTimeout(async () => {
if(!isNaN(videoLength)){
const cutResponse = await cutVideoLength({