You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| delay | number or `false` | `500` | The delay between scans in milliseconds. To disable the interval pass in `false`.
70
+
| facingMode | `user` or `environment` | `environment` | Specify which camera should be used (if available).
71
+
| resolution | number | `600` | The resolution of the video (or image in legacyMode). Larger resolution will increase the accuracy but it will also slow down the processing time.
72
+
| style | a valid React style | none | Styling for the container element. **Warning** The preview will always keep its 1:1 aspect ratio.
73
+
| className | string | none | ClassName for the container element.
74
+
| showViewFinder | boolean | `true` | Show or hide the build in view finder. See demo
75
+
| legacyMode | boolean | `false` | If the device does not allow camera access (e.g. IOS Browsers, Safari) you can enable legacyMode to allow the user to take a picture (On a mobile device) or use an existing one. To trigger the image dialog just call the method `openImageDialog` from the parent component. **Warning** You must call the method from a user action (eg. click event on some element).
63
76
64
-
**onScan**
65
-
66
-
Type: `function`, Required, Argument: `result`
67
-
68
-
Scan event handler. Called every scan with the decoded value or `null` if no QR code was found.
The delay between scans in milliseconds. To disable the interval pass in `false`.
95
-
96
-
**facingMode**
97
-
98
-
Type: `string`, Optional
99
-
100
-
Specify which camera direction should be used (if available). Options: `front` and `rear`.
101
-
102
-
**legacyMode**
103
-
104
-
Type: `boolean`, Optional, Default: `false`.
105
-
106
-
If the device does not allow camera access (e.g. IOS Browsers, Safari) you can enable legacyMode to allow the user to take a picture (On a mobile device) or use an existing one. To trigger the image dialog just call the method `openImageDialog` from the parent component. **Warning** You must call the method from a user action (eg. click event on some element).
107
-
108
-
**maxImageSize**
109
-
110
-
Type: `number`, Optional, Default: `1500`.
111
-
112
-
If `legacyMode` is active then the image will be downscaled to the given value while keepings its aspect ratio. Allowing larger images will increase the accuracy but it will also slow down the processing time.
113
-
114
-
**style**
115
-
116
-
Type: `object`, Optional
117
-
118
-
Styling for the preview element. This will be a `video` or an `img` when `legacymode` is `true`. **Warning** The preview will keep its aspect ratio, to disable this set the CSS property [objectFit](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) to `fill`.
119
-
120
-
**className**
121
-
122
-
Type: `string`, Optional
123
-
124
-
ClassName for the container element.
125
-
126
-
**chooseDeviceId**
127
-
128
-
Type: `function`, Optional, Arguments: (1) video devices matching `facingMode`, (2) all video devices
129
-
130
-
Called when choosing which device to use for scanning. By default chooses the first video device matching `facingMode`, if no devices match the first video device found is choosen.
131
77
132
78
## Dev
133
79
@@ -140,15 +86,13 @@ Called when choosing which device to use for scanning. By default chooses the fi
0 commit comments