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
+4
View File
@@ -206,6 +206,10 @@ export default class Enclave<P = Page> {
server.messages[msg.channel_id][msg.message.id] = msg.message;
this.forceRender();
return;
case "JoinVoice":
server.voiceJoin && server.voiceJoin(msg.pin, msg.channel_id);
return;
}
}
}
+9
View File
@@ -29,6 +29,11 @@ export type ClientMethod =
method: "MessageDeleted";
channel_id: string;
message_id: string;
}
| {
method: "JoinVoice";
channel_id: string;
pin: number;
};
export type ServerMethod =
@@ -71,4 +76,8 @@ export type ServerMethod =
method: "DeleteMessage";
channel_id: string;
message_id: string;
}
| {
method: "JoinVoice";
channel_id: string;
};
+1
View File
@@ -31,6 +31,7 @@ export default class EnclaveServer {
public meta?: ServerMeta;
public messages: Record<string, Record<string, StoredMessage>>;
public users: Record<string, ClientMeta | null>;
public voiceJoin?: (pin: number, channelId: string) => void;
public constructor(hostname: string, isSecure: boolean) {
this.hostname = hostname;