Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webcam: add nativeCameraFacingMode to Webcam and Dashboard #4047

Merged
merged 3 commits into from Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/@uppy/webcam/types/index.d.ts
Expand Up @@ -12,6 +12,9 @@ export interface WebcamOptions extends PluginOptions {
onBeforeSnapshot?: () => Promise<void>
countdown?: number | boolean
mirror?: boolean
/**
* @deprecated Use `videoConstraints.facingMode` instead.
*/
facingMode?: string
showVideoSourceDropdown?: boolean
modes?: WebcamMode[]
Expand Down
10 changes: 5 additions & 5 deletions website/src/docs/webcam.md
Expand Up @@ -64,15 +64,15 @@ uppy.use(Webcam, {
'picture',
],
mirror: true,
showVideoSourceDropdown: false,
facingMode: 'user', // @TODO: remove in the next major
aduh95 marked this conversation as resolved.
Show resolved Hide resolved
videoConstraints: {
facingMode: 'user',
width: { min: 720, ideal: 1280, max: 1920 },
height: { min: 480, ideal: 800, max: 1080 },
},
showRecordingLength: false,
preferredVideoMimeType: null,
preferredImageMimeType: null,
mobileNativeCamera: isMobile(),
preferredVideoMimeType: null,
showRecordingLength: false,
mobileNativeCamera: isMobile({ tablet: true }),
locale: {},
})
```
Expand Down