diff --git a/src/Main.res b/src/Main.res index a521804d..22c4244d 100644 --- a/src/Main.res +++ b/src/Main.res @@ -158,13 +158,23 @@ let startApp = async (): unit => { log("Co-op partner speaking") } }) - // Start voice with the current session (uses multiplayer session ID). - VoiceBridge.startVoice( - MultiplayerGlobal.voice, - MultiplayerGlobal.client, - ~sessionId="default", - ) - log("Voice bridge initialized") + // Skip Burble auto-start under WebDriver-driven browsers (Playwright, + // Selenium, headless CI). The browser-native WebSocket error from a + // refused connection prints to console.error and can't be suppressed + // by an app-side handler; gating startup on `navigator.webdriver` + // keeps voice functional in real browsers but quiet under automation. + let isAutomated: bool = %raw(`!!(typeof navigator !== "undefined" && navigator.webdriver === true)`) + if !isAutomated { + // Start voice with the current session (uses multiplayer session ID). + VoiceBridge.startVoice( + MultiplayerGlobal.voice, + MultiplayerGlobal.client, + ~sessionId="default", + ) + log("Voice bridge initialized") + } else { + log("Voice bridge skipped (automated browser detected)") + } // Show main hub screen (replaces old TitleScreen as primary entry point) log("Showing main hub...")