52 lines
2 KiB
TypeScript
52 lines
2 KiB
TypeScript
import dotenv from 'dotenv';
|
|
import path from 'path';
|
|
|
|
dotenv.config();
|
|
|
|
export const config = {
|
|
// Service
|
|
port: parseInt(process.env.PORT || '4100', 10),
|
|
nodeEnv: process.env.NODE_ENV || 'development',
|
|
|
|
// Gateway
|
|
gatewayWsUrl: process.env.GATEWAY_WS_URL || 'wss://gateway-int.poweron-center.net/api/teamsbot/ws',
|
|
|
|
// Bot
|
|
botName: process.env.BOT_NAME || 'PowerOn AI',
|
|
botHeadless: process.env.BOT_HEADLESS !== 'false',
|
|
/**
|
|
* Replace Chromium's fake test-pattern video with a canvas stream (gradient + label).
|
|
* Default OFF: in tests with the poweron tenant the Teams SFU rejects all
|
|
* outbound video m-lines (port=0/inactive) regardless of which track we send,
|
|
* so enabling video just costs CPU + adds a misleading "camera on" indicator
|
|
* for other participants without ever transmitting frames. Set
|
|
* BOT_USE_CANVAS_VIDEO=true if a future tenant policy permits IP video and
|
|
* you want to push the canvas stream.
|
|
*/
|
|
botUseCanvasVideo: process.env.BOT_USE_CANVAS_VIDEO === 'true',
|
|
|
|
// Logging
|
|
logLevel: process.env.LOG_LEVEL || 'info',
|
|
logDir: process.env.LOG_DIR || './output/logs',
|
|
|
|
// Screenshots
|
|
screenshotDir: process.env.SCREENSHOT_DIR || './output/screenshots',
|
|
screenshotOnError: process.env.SCREENSHOT_ON_ERROR === 'true',
|
|
// Stream screenshot bytes as base64 chunks into the bot log. Only useful in
|
|
// cloud deployments (e.g. Azure App Service) where the screenshot files on
|
|
// disk are not reachable. Locally the UI loads them via the REST proxy
|
|
// (/api/teamsbot/{instanceId}/screenshots/{file}), so this just bloats the
|
|
// log. Default OFF.
|
|
screenshotLogBase64: process.env.SCREENSHOT_LOG_BASE64 === 'true',
|
|
|
|
// Timeouts (in milliseconds)
|
|
timeouts: {
|
|
lobbyWait: 120000, // 2 minutes waiting in lobby
|
|
joinTimeout: 30000, // 30 seconds to join
|
|
captionsEnable: 10000, // 10 seconds to enable captions
|
|
pageLoad: 30000, // 30 seconds for page load
|
|
},
|
|
|
|
// Teams URLs
|
|
teamsBaseUrl: 'https://teams.microsoft.com',
|
|
};
|