From e9ed9580db2c1f430e5879b56774340d307feb2f Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 9 Jan 2026 14:18:14 +0100 Subject: [PATCH] trust localhost for CI and devbuil --- src/state/initialMuteState.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/state/initialMuteState.ts b/src/state/initialMuteState.ts index 982e6fce..f7582daa 100644 --- a/src/state/initialMuteState.ts +++ b/src/state/initialMuteState.ts @@ -19,18 +19,18 @@ export function calculateInitialMuteState( urlParams: Pick, packageType: "full" | "embedded", hostname: string | undefined = undefined, - isDevBuild: boolean = import.meta.env.DEV, + trustLocalhost: boolean = import.meta.env.DEV || !!process.env.CI, ): { audioEnabled: boolean; videoEnabled: boolean } { const { skipLobby, callIntent } = urlParams; logger.debug( - `calculateInitialMuteState: skipLobby=${skipLobby}, callIntent=${callIntent}, hostname=${hostname}, isDevBuild=${isDevBuild}`, + `calculateInitialMuteState: skipLobby=${skipLobby}, callIntent=${callIntent}, hostname=${hostname}, isDevBuild=${trustLocalhost}`, ); const isTrustedHost = packageType == "embedded" || // Trust local hosts in dev mode to make local testing easier - (hostname == "localhost" && isDevBuild); + (hostname == "localhost" && trustLocalhost); if (skipLobby && !isTrustedHost) { // If host not trusted and lobby skipped, default to muted to protect user privacy.