fix(recorders): set PRE_ROLL_SECONDS=1 for sdi/deltacast/blackmagic sidecars

This commit is contained in:
Wild Dragon Dev 2026-06-03 22:07:16 +00:00
parent 3d4880d944
commit a22bda44a7

View file

@ -276,6 +276,7 @@ function buildStandbyEnv(recorder) {
`LIVE_DIR=${liveDir}`,
`MAM_API_TOKEN=${process.env.CAPTURE_TOKEN || ''}`,
`STANDBY=1`,
`PRE_ROLL_SECONDS=1`,
];
}
@ -699,6 +700,12 @@ router.post('/:id/start', requireRecorderEdit, async (req, res, next) => {
if (dcCount) env.push(`DELTACAST_PORT_COUNT=${dcCount}`);
}
// Framecache slot has been warm since the bridge started — 1s pre-roll is
// sufficient. Avoids a 5s startup lag on both on-demand and standby spawns.
if (['deltacast', 'sdi', 'blackmagic'].includes(sourceType)) {
env.push('PRE_ROLL_SECONDS=1');
}
if (sourceType === 'srt' || sourceType === 'rtmp') {
env.push(`LISTEN=${isListener ? '1' : '0'}`);
if (isListener) {