Add more buffer to insert time for Event-Based Video

ejs-templating-update
Moe 2022-07-21 18:55:33 -07:00
parent 70401b5631
commit 5963d8c759
1 changed files with 2 additions and 1 deletions

View File

@ -419,7 +419,8 @@ module.exports = (s,config,lang,app,io) => {
monitorConfig.mode === 'start' &&
(monitorDetails.detector_record_method === 'sip' || monitorDetails.detector_record_method === 'hot')
){
createEventBasedRecording(d,moment(eventTime).subtract(5,'seconds').format('YYYY-MM-DDTHH-mm-ss'))
const secondBefore = (parseInt(monitorDetails.detector_buffer_seconds_before) || 5) + 1
createEventBasedRecording(d,moment(eventTime).subtract(secondBefore,'seconds').format('YYYY-MM-DDTHH-mm-ss'))
}
d.currentTime = eventTime
d.currentTimestamp = s.timeObject(d.currentTime).format()