Permissions policy violation: microphone is not al...
# support
e
I've embedded the web snippet (https://docs.vapi.ai/examples/voice-widget) for my voice agent in my new Wix website page, however when I initiate a (web) call I'm seeing the following message in the console - "[Violation] Permissions policy violation: microphone is not allowed in this document." - Why don't I see the browser popup asking me to grant access permissions to the microphone? - Even if I manually grant the microphone permission to the hosting site, it still doesn't solve the issue (maybe because the snippet creates an iFrame pointing to a different domain)? Please help!
v
@ehefetz It sounds like you're encountering a permissions policy issue related to the use of the microphone within an iFrame. Here are a couple of things to check and try: 1. **Permissions Policy Header**: Ensure that the server hosting your Wix website includes the
Permissions-Policy
header with the
microphone=(*)
directive, which allows the use of the microphone from all origins, or specify the allowed origins. 2. **iFrame Attributes**: Check the
<iframe>
tag that embeds the web snippet. It should have the
allow="microphone *"
attribute to explicitly grant permission to access the microphone. 3. **Browser Settings**: Some browsers have settings that can block microphone access by default. Make sure that your browser settings allow microphone access for your Wix website. 4. **Cross-Origin Resource Sharing (CORS)**: If the iFrame is pointing to a different domain, CORS policies might prevent the microphone access. Ensure that the server hosting the voice widget has the appropriate CORS headers set to allow your Wix website to access the resources. 5. **HTTPS Protocol**: Modern browsers require a secure context (HTTPS) for granting microphone access. Ensure that both your Wix website and the domain the iFrame is pointing to are served over HTTPS. If you've checked all these points and the issue persists, it might be a more complex problem that requires direct support. In that case, I recommend visiting the #support channel on our Discord server or submitting a support request for more personalized assistance.
You can continue this conversation by mentioning me in the message.
s
@ehefetz you need to insert the javascript code using custom-code which you can search about it instead of directly injecting the code, after that the error will disappear. FYI: This is blocked by the browser. Do let me know if you have further questions.
35 Views