Files
Toju/src/app/core/constants.ts

40 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Application-wide constants shared across multiple components and services.
*
* Centralises localStorage keys, common defaults, and UI thresholds
* so that magic strings and numbers are defined in one place.
*/
/** Key used to persist the current user's ID in localStorage. */
export const STORAGE_KEY_CURRENT_USER_ID = 'metoyou_currentUserId';
/** Key used to persist the last visited route for session restore. */
export const STORAGE_KEY_LAST_VISITED_ROUTE = 'metoyou_lastVisitedRoute';
/** Key used to persist signaling / API connection settings. */
export const STORAGE_KEY_CONNECTION_SETTINGS = 'metoyou_connection_settings';
/** Key used to persist voice settings (input/output devices, volume). */
export const STORAGE_KEY_VOICE_SETTINGS = 'metoyou_voice_settings';
/** Key used to persist per-user volume overrides (0200%). */
export const STORAGE_KEY_USER_VOLUMES = 'metoyou_user_volumes';
/** Regex that extracts a roomId from a `/room/:roomId` URL path. */
export const ROOM_URL_PATTERN = /\/room\/([^/]+)/;
/** Maximum number of actions retained by NgRx Store devtools. */
export const STORE_DEVTOOLS_MAX_AGE = 25;
/** Default maximum number of users allowed in a new room. */
export const DEFAULT_MAX_USERS = 50;
/** Default audio bitrate in kbps for voice chat. */
export const DEFAULT_AUDIO_BITRATE_KBPS = 96;
/** Default volume level (0-100). */
export const DEFAULT_VOLUME = 100;
/** Default search debounce time in milliseconds. */
export const SEARCH_DEBOUNCE_MS = 300;