Open mshunjan opened 1 year ago
Just stumbled over this issue, too. One way to make it work would be to simply set the prop on the dashboard itself:
const Foo = () => {
const isMobileDevice = isMobile({tablet: true});
return (
<Dashboard
showNativePhotoCameraButton={isMobileDevice}
showNativeVideoCameraButton={isMobileDevice}
// ...
/>
);
}
Initial checklist
Link to runnable example
https://codesandbox.io/s/native-camera-uppy-7okmrk
Steps to reproduce
I've provided a minimal example above of the following steps:
Expected behavior
A native camera view should appear, as is shown on the uppy landing page when on a mobile device
Actual behavior
The camera defaults to the in browser view. The source code requires a target, as shown in the code snippet below, but this doesn't seem to be possible with uppy's react components, at least according to the docs. https://github.com/transloadit/uppy/blob/7c9e1664012e417bac131e6708adf98baaffbb9c/packages/%40uppy/webcam/src/Webcam.jsx#L598-L610