Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions src/Main.res
Original file line number Diff line number Diff line change
Expand Up @@ -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...")
Expand Down
Loading