fix: disconnect from and reconnect to socket server when visibilitychange

This commit is contained in:
Ryan Di 2022-08-26 19:58:54 +08:00
parent 2816c72c62
commit f8c9f63650
2 changed files with 29 additions and 0 deletions

View file

@ -7,6 +7,7 @@ export const SYNC_FULL_SCENE_INTERVAL_MS = 20000;
export const SYNC_BROWSER_TABS_TIMEOUT = 50;
export const CURSOR_SYNC_TIMEOUT = 33; // ~30fps
export const DELETED_ELEMENT_TIMEOUT = 24 * 60 * 60 * 1000; // 1 day
export const HIDDEN_DISCONNECT_TIMEOUT = 30000;
export const FILE_UPLOAD_MAX_BYTES = 3 * 1024 * 1024; // 3 MiB
// 1 year (https://stackoverflow.com/a/25201898/927631)