Testing voice chat UDP

This commit is contained in:
2026-08-26 14:31:26 +02:00
parent d95ed3215e
commit f6cfea1621
7 changed files with 35 additions and 8 deletions
+13 -1
View File
@@ -20,7 +20,19 @@ export default function VoiceChannel({
lastChannelId.current = channel.id;
invoke("disconnect_from_vc");
invoke("connect_to_vc", { hostname });
if (channel.kind !== "voice" || !appRef.current?.server) return;
appRef.current.server.voiceJoin = (pin, channelId) => {
invoke("connect_to_vc", { hostname, pin, channelId }).catch(
console.error,
);
};
appRef.current.server.websocket?.send({
method: "JoinVoice",
channel_id: channel.id,
});
}, [channel.id]);
return (