switchreplay workers to rtsp

This commit is contained in:
legop3
2026-09-15 16:27:08 -04:00
parent aa3c0c0e7b
commit c3c60fde18
9 changed files with 48 additions and 69 deletions
@@ -32,13 +32,12 @@ function registerVideoAuthRoute(deps) {
});
}
const isSrtLikeProtocol = protocol === 'srt' || protocol === 'srtconn' || protocol.startsWith('srt');
const isRtspProtocol = protocol === 'rtsp' || protocol.startsWith('rtsp');
const isForwardAudioRead = action === 'read' && streamInfo?.id?.endsWith('-fwd');
if ((action === 'read' && isSrtLikeProtocol) || isForwardAudioRead) {
return res.status(200).end();
}
if (action === 'publish' && isSrtLikeProtocol) {
const isLoopback = ip === '127.0.0.1' || ip === '::1';
// Replay and snapshot workers read MediaMTX through loopback RTSP. They do
// not represent a browser session, while non-loopback RTSP readers remain
// subject to the normal session authorization below.
if (action === 'read' && isRtspProtocol && isLoopback) {
return res.status(200).end();
}
/*