Pass 'allow microphone;camera' parameters in sandbox iframe

This question references https://www.wix.com/code/home/forum/questions-answers/how-allow-access-to-the-camera-via-chrome

I have the same problem reported by Christophe. Below is a description of the issue, caused after Chrome’s April update which Wix does not support.
Please let us know if there’s a workaround or a way to ask Wix product management to prioritize this as an urgent request.

The problem

  1. In April Chrome changed their iFrame behavior. It forces iFrames to explicitly request access to microphone and camera. This change is unique to Chrome - not an issue affecting Firefox or Edge.
    See good summary here: https://support.tokbox.com/hc/en-us/articles/115001864070-Chrome-64-iFrame-behavior-change

  2. Currently, any code added to a Wix website (for example an embed iFrame) is served up inside of another iFrame. This surrounding iframe (aka sandbox iframe) is generated by Wix and not controlled by the user, so there is no way for the user to add the additional parameters for Chrome 64. i.e. add the ‘allow="microphone; camera’ parameters.

  3. This prevents embeds in Wix from functioning correctly as they cannot acquire the microphone and camera.

Suggested solution
Suggest solution is for Wix to parse the ‘allow’ parameters in the user’s iframe, and pass them within Wix’s sandbox iframe. This is a change that Wix has to do in the platform.
Otherwise all websites which implement embdes with camera, location, or microphone cannot work within Wix.
Note that this is not a problem if designing the page in Squarespace or Wordpress as they don’t have this sandbox iframe problem.

Please can you let me know if this makes sense. This problem stops us from using Wix.
Thanks.

1 Like

Hi,
This request doesn’t seem related to Wix Code specifically.
For general Wix support and requests, you can contact support@wix.com.
Thanks!

Have you managed to find a way of accessing the microphone and camera? I am looking into this also and wix have enabled some w3c code to allow scripts etc, I am keen to gain access to the camera for a number of reasons, this is turning into a potential deal breaker, if you could provide basic code and guidance that would be greatly appreciated.

Hi could you advise me if you have managed to be able to gain access to your camera and if so would you please share how you have done so? this would help me so much. Si

Hi Crowd. I am also attempting this same thing. Can’t access camera in the sandboxed iframe.

In wix documents they’ve said they have allowed certain commands to be allowed in the iframe but still no one has been able to provide an example of how this is achieved, Ive managed to get external code to be able to display a camera but nothing directly coded in wix or the HTML, what I have gathered is that the allow is likely to need to be passed via a backend web module or similar to enable camera and microphone but this is not something I’m currently able to code. But I am working on a work around to try and make it possible.

@simonadams please let us know if you find the work around. I’m assuming if these created permission it would have to be through backend

@logan they have now allowed front end NPM modules and they have react, react-dom and react-webcam we should now be able to utilise the camera and provide the stream to the iframe/html via messaging, I will have to still work on this a bit more but there are others who are more skilled than myself that could achieve this quickly.

Old post from 2018 being closed.