Connect to camera on desktop not requesting permission in iFrame widget

I’ve integreated the iFrame UC widget on Wix and I noticed that on desktop Safari and Chrome the widget does not request camera permission when I click the “Request permission” button, so the feature does not work.

Is this a limitation of the iFrame widget? If so, is there an way way to hide the option just for desktop? Or do I need to include my own JS browser detection logic?‘’

Hi @Jude_Osborn, this is a limitation of the iframe. Wix renders custom HTML within an iframe without granting camera and microphone permissions. Consider disabling the camera tab on the desktop. The widget doesn’t have an API for detecting mobile/desktop, but you can do it with JS

if (
  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
    navigator.userAgent
  )
) {
  // mobile devices
  window.UPLOADCARE_TABS = "file camera url facebook";
} else {
  // desktop devices
  window.UPLOADCARE_TABS = "file url facebook";
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.