This commit is contained in:
legop3
2026-03-20 01:50:29 -04:00
parent 7ad3dc7015
commit c729631104
7 changed files with 144 additions and 128 deletions
+11 -1
View File
@@ -845,7 +845,6 @@ io.on('connection', (socket) => {
videoSessions.revokeWhere(
(info) => info?.socketId === socket.id && info?.sourceType === 'roverMic' && info?.sourceId === pathId,
);
startMicWhipRelay(normalized, socket.id);
const token = videoSessions.createSession(socket, { type: 'roverMic', id: pathId });
const whipUrl = buildWhipUrl(pathId);
cb({ success: true, roverId: normalized, pathId, token, whipUrl });
@@ -854,6 +853,17 @@ io.on('connection', (socket) => {
}
});
socket.on('audio:micWhipReady', ({ roverId } = {}, cb = () => {}) => {
try {
const normalized = String(roverId || '').trim();
ensureAudioForwardPermission(socket, normalized);
startMicWhipRelay(normalized, socket.id);
cb({ success: true, roverId: normalized });
} catch (err) {
cb({ error: err.message });
}
});
socket.on('audio:micWhipStop', ({ roverId } = {}, cb = () => {}) => {
try {
const normalized = String(roverId || '').trim();