diff --git a/server/room_attacher.js b/server/room_attacher.js index 0406a2ef6f9e7e4b53571e06718b552f07bbfbeb..bd91e262fc385456c9ce6b40e9acc4699fa508d4 100644 --- a/server/room_attacher.js +++ b/server/room_attacher.js @@ -3,9 +3,16 @@ const sleep = require("sleep-promise"); const { clearInterval } = require("timers"); const fs = require("fs"); -const HEADLESS = true; -const SCREENSHOT_INTERVAL_MS = 3000; -const USERINFO_INTERVAL_MS = 2000; +const HEADLESS = + process.env.HEADLESS !== undefined ? process.env.HEADLESS : true; +const SCREENSHOT_INTERVAL_MS = + process.env.SCREENSHOT_INTERVAL_MS !== undefined + ? process.env.SCREENSHOT_INTERVAL_MS + : 3000; +const USERINFO_INTERVAL_MS = + process.env.USERINFO_INTERVAL_MS !== undefined + ? process.env.USERINFO_INTERVAL_MS + : 2000; // global state variables, because they are great var stateRoomUrl = null;