2020-06-19 16:36:40 +02:00
|
|
|
const DEBUG_MODE: boolean = process.env.DEBUG_MODE == "true";
|
2021-07-30 14:08:27 +02:00
|
|
|
const START_ROOM_URL: string =
|
2021-07-27 16:37:01 +02:00
|
|
|
process.env.START_ROOM_URL || "/_/global/maps.workadventure.localhost/Floor1/floor1.json";
|
2021-07-30 14:08:27 +02:00
|
|
|
const PUSHER_URL = process.env.PUSHER_URL || "//pusher.workadventure.localhost";
|
|
|
|
export const ADMIN_URL = process.env.ADMIN_URL || "//workadventu.re";
|
|
|
|
const UPLOADER_URL = process.env.UPLOADER_URL || "//uploader.workadventure.localhost";
|
2021-02-08 20:46:26 +01:00
|
|
|
const STUN_SERVER: string = process.env.STUN_SERVER || "stun:stun.l.google.com:19302";
|
2021-02-16 18:13:30 +01:00
|
|
|
const TURN_SERVER: string = process.env.TURN_SERVER || "";
|
2021-05-17 15:49:18 +02:00
|
|
|
const SKIP_RENDER_OPTIMIZATIONS: boolean = process.env.SKIP_RENDER_OPTIMIZATIONS == "true";
|
|
|
|
const DISABLE_NOTIFICATIONS: boolean = process.env.DISABLE_NOTIFICATIONS == "true";
|
2021-07-30 14:08:27 +02:00
|
|
|
const TURN_USER: string = process.env.TURN_USER || "";
|
|
|
|
const TURN_PASSWORD: string = process.env.TURN_PASSWORD || "";
|
|
|
|
const JITSI_URL: string | undefined = process.env.JITSI_URL === "" ? undefined : process.env.JITSI_URL;
|
|
|
|
const JITSI_PRIVATE_MODE: boolean = process.env.JITSI_PRIVATE_MODE == "true";
|
2020-06-01 22:42:18 +02:00
|
|
|
const POSITION_DELAY = 200; // Wait 200ms between sending position events
|
2020-09-30 13:49:23 +02:00
|
|
|
const MAX_EXTRAPOLATION_TIME = 100; // Extrapolate a maximum of 250ms if no new movement is sent by the player
|
2021-07-30 14:08:27 +02:00
|
|
|
export const MAX_USERNAME_LENGTH = parseInt(process.env.MAX_USERNAME_LENGTH || "") || 8;
|
|
|
|
export const MAX_PER_GROUP = parseInt(process.env.MAX_PER_GROUP || "4");
|
|
|
|
export const DISPLAY_TERMS_OF_USE = process.env.DISPLAY_TERMS_OF_USE == "true";
|
2021-08-10 22:34:46 +02:00
|
|
|
export const NODE_ENV = process.env.NODE_ENV || "development";
|
2021-08-23 17:30:07 +02:00
|
|
|
export const CONTACT_URL = process.env.CONTACT_URL || undefined;
|
2020-04-05 20:57:14 +02:00
|
|
|
|
2021-07-30 14:08:27 +02:00
|
|
|
export const isMobile = (): boolean => window.innerWidth <= 800 || window.innerHeight <= 600;
|
2021-04-23 03:59:14 +02:00
|
|
|
|
2020-04-05 20:57:14 +02:00
|
|
|
export {
|
2020-04-13 19:40:10 +02:00
|
|
|
DEBUG_MODE,
|
2021-01-07 12:15:33 +01:00
|
|
|
START_ROOM_URL,
|
2021-05-17 13:50:31 +02:00
|
|
|
SKIP_RENDER_OPTIMIZATIONS,
|
|
|
|
DISABLE_NOTIFICATIONS,
|
2021-03-31 16:00:14 +02:00
|
|
|
PUSHER_URL,
|
2020-12-09 21:29:29 +01:00
|
|
|
UPLOADER_URL,
|
2020-06-02 10:48:04 +02:00
|
|
|
POSITION_DELAY,
|
2020-08-31 12:18:00 +02:00
|
|
|
MAX_EXTRAPOLATION_TIME,
|
2021-02-08 20:46:26 +01:00
|
|
|
STUN_SERVER,
|
2020-08-28 13:52:25 +02:00
|
|
|
TURN_SERVER,
|
|
|
|
TURN_USER,
|
|
|
|
TURN_PASSWORD,
|
2020-10-19 11:07:49 +02:00
|
|
|
JITSI_URL,
|
2021-07-30 14:08:27 +02:00
|
|
|
JITSI_PRIVATE_MODE,
|
|
|
|
};
|