feat: add voice_offer/answer/ice dispatcher handlers

This commit is contained in:
jevb
2026-03-18 03:59:41 +01:00
parent 0a964cc35f
commit b3293b2720
+23
View File
@@ -38,6 +38,11 @@ import {
joinVoiceChannel,
leaveVoiceChannel,
} from "@stores/voice.store";
import {
handleServerOffer,
handleServerAnswer,
handleServerIce,
} from "@lib/voiceSession";
import { createLogger } from "./logger";
const log = createLogger("dispatcher");
@@ -260,6 +265,24 @@ export function wireDispatcher(ws: WsClient): DispatcherCleanup {
}),
);
unsubs.push(
ws.on("voice_offer", (payload) => {
handleServerOffer(payload.sdp, payload.channel_id);
}),
);
unsubs.push(
ws.on("voice_answer", (payload) => {
handleServerAnswer(payload.sdp);
}),
);
unsubs.push(
ws.on("voice_ice", (payload) => {
handleServerIce(payload.candidate);
}),
);
// ── Server Events ─────────────────────────────────────
unsubs.push(