feat(chat): add stateless ciphertext relay

This commit is contained in:
KoalaDev
2026-07-15 07:02:08 +02:00
parent 8fee98834c
commit f2eee6dc41
8 changed files with 219 additions and 3 deletions
+5 -1
View File
@@ -57,6 +57,9 @@ export const EVENTS = {
EPISODE_READY: "episode_ready", // Response: loaded the episode and paused at 0:00
EPISODE_LOBBY_CANCEL: "episode_lobby_cancel", // Broadcast: cancel active lobby and resume
// Ephemeral end-to-end encrypted chat
CHAT_MESSAGE: "chat_message", // Ciphertext relay; no server history
// Ping / Latency
PING: "ping", // { t: timestamp, target?: peerId } — empty target = server echo
PONG: "pong" // server responds with same { t } for client RTT calculation
@@ -77,7 +80,8 @@ export const CONTROL_MODES = {
// simply ignore the field. Add a flag here as each server-gated feature lands.
export const CAPABILITIES = {
HOST_CONTROL: 'host-control',
CO_HOST: 'co-host' // owner promotes guests to additional controllers
CO_HOST: 'co-host', // owner promotes guests to additional controllers
CHAT: 'chat'
};
export const HEARTBEAT_INTERVAL = 15000; // 15s