mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-07-26 12:08:15 +00:00
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
/**
|
|
* KoalaSync Shared Constants & Protocol Definitions
|
|
*/
|
|
|
|
export const PROTOCOL_VERSION = "1.0.0";
|
|
export const APP_VERSION = "1.0.3";
|
|
|
|
export const OFFICIAL_SERVER_URL = 'wss://sync.shik3i.net';
|
|
export const OFFICIAL_LANDING_PAGE_URL = 'https://koalasync.shik3i.net';
|
|
export const OFFICIAL_SERVER_TOKEN = '62170b705234c4f4807a9b22420bb93cf1a2aacfa4c5d3b47804482babb8eb50';
|
|
|
|
export const EVENTS = {
|
|
// Connection & Room
|
|
JOIN_ROOM: "join_room",
|
|
LEAVE_ROOM: "leave_room",
|
|
ROOM_DATA: "room_data", // Server -> Client: current room state
|
|
ERROR: "error",
|
|
|
|
// Media Control
|
|
PLAY: "play",
|
|
PAUSE: "pause",
|
|
SEEK: "seek",
|
|
|
|
// Sync Coordination
|
|
PEER_STATUS: "peer_status", // Heartbeat from peers
|
|
FORCE_SYNC_PREPARE: "force_sync_prepare",
|
|
FORCE_SYNC_ACK: "force_sync_ack",
|
|
FORCE_SYNC_EXECUTE: "force_sync_execute",
|
|
EVENT_ACK: "event_ack",
|
|
GET_ROOMS: "get_rooms",
|
|
ROOM_LIST: "room_list"
|
|
};
|
|
|
|
export const HEARTBEAT_INTERVAL = 15000; // 15s
|
|
export const FORCE_SYNC_TIMEOUT = 5000; // 5s timeout for ACKs
|