Skip to content

Commit

Permalink
Add pending and permission granted stories for idcapture
Browse files Browse the repository at this point in the history
  • Loading branch information
ayinloya committed Jan 19, 2024
1 parent beb9bc1 commit 3f9a87a
Showing 1 changed file with 31 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
import { SmartCamera } from "../../../domain/camera/SmartCamera";
import "./index";

const meta = {
component: "id-capture",
render: () => `
<id-capture
show-navigation
document-capture-modes="camera,upload"
>
</id-capture>
`,
};

export default meta;


export const IdCaptureScreenPendingPermission = {
loaders: [
async () => ({
'data-camera-ready': SmartCamera.stopMedia(),
}),
],
}
export const IdCaptureScreen = {
render: () => `
<id-capture
show-navigation
document-capture-modes="camera,upload"
>
</id-capture>
`,
}
loaders: [
async () => ({
'data-camera-ready': await SmartCamera.getMedia({
audio: false,
video: {
facingMode: 'environment',
width: { min: 1280 },
// NOTE: Special case for multi-camera Samsung devices (learnt from Acuant)
// "We found out that some triple camera Samsung devices (S10, S20, Note 20, etc) capture images blurry at edges.
// Zooming to 2X, matching the telephoto lens, doesn't solve it completely but mitigates it."
zoom: SmartCamera.isSamsungMultiCameraDevice() ? 2.0 : 1.0,
},
})
}),
],
}

0 comments on commit 3f9a87a

Please sign in to comment.