Repository navigation
fix: bundle @vapi-ai/web 3.0.1 so the widget asks for the microphone before creating a call - #41
Open
dhruva-vapi wants to merge 1 commit into
Open
dhruva-vapi wants to merge 1 commit into
dhruva-vapi wants to merge 1 commit into
Conversation
…before creating a call
dhruva-vapi
force-pushed
the
dr/widget-web-sdk-3-mic-preflight
branch
from
October 23, 2026 18:18
f829c6a to
7c6a2f9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Value
Sites that embed the Vapi voice widget stop creating calls before the visitor has allowed the microphone.
Today the widget creates the call first, and the browser asks for the microphone afterwards. If the visitor is slow to answer the prompt or blocks it, the call sits silent and the server ends it as
assistant-did-not-receive-customer-audio. Zeals saw about 40% of their widget calls end this way.@vapi-ai/web3.0.1 (VapiAI/client-sdk-web#189) asks for the microphone first and creates no call if the visitor blocks it. The widget's embed script bundles its own copy of the SDK, and that copy was still 2.5.0, so widget users never got the fix. This PR bundles 3.0.1.Small edit since first push: the widget now ignores the SDK's recoverable errors instead of showing the call as ended, and the peer range accepts 3.0.0.
What changed
@vapi-ai/web3.0.1. It is a dev dependency so the lockfile pins the version that gets bundled.^2.5.0 || ^3.0.0, so apps that use the React components with their own 2.x SDK are not forced to upgrade.erroras the end of the call. 3.x reports some recoverable problems as errors while the call keeps running, for example a noise-cancellation setup failure or the assistant's audio being blocked from playing. Before, those flipped the widget back to its Start button while the call and microphone were still live, so the visitor could not end the call. Errors that end or prevent a call, including a blocked microphone, still reset the widget.Testing plan
New
tests/widget-microphone.spec.ts, run in Chromium with the API stubbed so no real call is placed:The existing six embed tests, lint, format check, type check, and both builds pass locally on Node 22. CI runs on Node 18, while
@vapi-ai/web3.x and@daily-co/daily-js0.93 declare Node >=22.14. npm treats that as a warning, but this PR's CI run is the first check of it.