Hi. I’m working on a React app that includes a function to take and upload photos. When I use it on my iPad, Uppy always defaults to the front camera. There are five cameras on my iPad, and I’d like to choose which one is the default. I’ve looked with no luck for a way to tell Uppy which camera to use, and then it occurred to me that Uppy might be using the browser’s default camera. I tried setting that, but Uppy still opens with the front-facing camera. Is there a way to select specifically which of the five camera available Uppy should default to? Thanks. I’m very new to JS and React, so please excuse me if the solution to this is obvious.
Setting the default camera in Uppy Webcam
I would like to use the front or back camera of my iPhone but I always get the user-facing and cannot switch to the back camera. Did you solve that problem? I user Uppy 5. Thanks.
No, the user has to decide which camera they want to use.
You can decide if you want to use native mobile UI or Uppy’s UI: Webcam | Uppy
On iPhone, Uppy’s Webcam UI can let the user pick a camera if the source dropdown is enabled. In Uppy 5, try setting showVideoSourceDropdown: true in the Webcam plugin options; that exposes the available video inputs instead of relying on the browser default. If you only need a rear-camera preference, also try a facingMode constraint with ideal: ‘environment’ via the plugin’s video constraints if your version supports it. It won’t guarantee a specific one of five iPad cameras, but it gives the user a way to switch.