@getyoti/react-face-capture 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v0.4.0
4
+
5
+ ### New features
6
+
7
+ - implemented Face capture module vanilla, to run our module without react stack application
8
+ - implemented brightness validation to stop images too dark or too bright
9
+ - Implemented localisation languages
10
+ - `cs`: Czech
11
+ - `da`: Danish
12
+ - `de`: German
13
+ - `fi`: Finnish
14
+ - `hi`: Hindi
15
+ - `it`: Italian
16
+ - `ja`: Japanese
17
+ - `nb`: Norwegian
18
+ - `nl`: Dutch
19
+ - `pl`: Polish
20
+ - `pt`: Portuguese
21
+ - `ro`: Romanian
22
+ - `ru`: Russian
23
+ - `sv`: Swedish
24
+ - `th`: Thai
25
+ - `tr`: Turkish
26
+ - `vi`: Vietnamese
27
+
3
28
  ## v0.3.1
4
29
 
5
30
  ### New features
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # React Face capture integration
1
+ # Yoti Face capture integration
2
2
 
3
3
  The purpose of this module is to capture a face and return the output image.
4
4
 
@@ -19,12 +19,12 @@ The package depends on the following peer dependencies
19
19
 
20
20
  | Browser | Versions |
21
21
  | ------- | ----------------------------- |
22
- | and_chr | 91 |
23
- | chrome | 91,90,89,88 |
24
- | edge | 91,90 |
25
- | firefox | 89,88,87,86 |
26
- | ios_saf | 14.5-14.6,14.0-14.4,13.4-13.7 |
27
- | safari | 14.1,14,13.1,13 |
22
+ | and_chr | 96 |
23
+ | chrome | 96,95,94,93 |
24
+ | edge | 96,95 |
25
+ | firefox | 95,94,93,92 |
26
+ | ios_saf | 15.0-15.1,14.5-14.8,14.0-14.4 |
27
+ | safari | 15.1,15,14.1,14 |
28
28
 
29
29
  </browserSupportTable>
30
30
 
@@ -84,11 +84,26 @@ new CopyPlugin([
84
84
  Current languages supported:
85
85
 
86
86
  - `en`: English
87
+ - `cs`: Czech
88
+ - `da`: Danish
89
+ - `de`: German
87
90
  - `es`: Spanish (Spain)
88
91
  - `es-419`: Spanish (Latin America)
89
- - `it`: Italian
90
- - `de`: German
92
+ - `fi`: Finnish
91
93
  - `fr`: French
94
+ - `hi`: Hindi
95
+ - `it`: Italian
96
+ - `ja`: Japanese
97
+ - `nb`: Norwegian
98
+ - `nl`: Dutch
99
+ - `pl`: Polish
100
+ - `pt`: Portuguese
101
+ - `ro`: Romanian
102
+ - `ru`: Russian
103
+ - `sv`: Swedish
104
+ - `th`: Thai
105
+ - `tr`: Turkish
106
+ - `vi`: Vietnamese
92
107
 
93
108
  ### Language fallback
94
109
 
@@ -129,3 +144,44 @@ export function App() {
129
144
  return <FaceCapture onSuccess={onSuccess} onError={onError} />;
130
145
  }
131
146
  ```
147
+
148
+ ## Face capture module vanilla
149
+
150
+ If you do not have a react tech stack, you can use the face capture vanilla version.
151
+ When you install the library on your machine, It's located inside the folder `vanilla`.
152
+
153
+ Add the package in your codebase and serve the static assets:
154
+
155
+ ### 1. serve package static assets
156
+
157
+ ```bash
158
+
159
+ /@getyoti/react-face-capture/vanilla/assets/face-capture/
160
+ /@getyoti/react-face-capture/vanilla/index.css
161
+ /@getyoti/react-face-capture/vanilla/index.js
162
+ ```
163
+
164
+ ### 2. Add Face capture script and style
165
+
166
+ Inside the page you want to have face capture, add Face capture scripts and style like in the example below.
167
+ `faceCaptureAssetsRootUrl` is property you can use to instruct the library where neural net files are served otherwise we look the files relative to the page location `assets/face-capture/`.
168
+
169
+ ### 3. Render face capture
170
+
171
+ Our scripts will give you access to `Yoti.FaceCaptureModule.render` you can pass 2 parameters, first parameters are the props and are the same used in react integration and second parameter you need a html DOM reference so we know where we can render the UI.
172
+
173
+ **index.html**
174
+
175
+ ```html
176
+ <link href="/@getyoti/react-face-capture/vanilla/index.css" />
177
+ <script src="/@getyoti/react-face-capture/vanilla/index.js" />
178
+ <script>
179
+ const props = {
180
+ faceCaptureAssetsRootUrl: '/@getyoti/react-face-capture/vanilla/assets/';
181
+ };
182
+
183
+ Yoti.FaceCaptureModule.render(props, document.getElementById('face-capture-module-root'));
184
+ </script>
185
+
186
+ <div id="face-capture-module-root"></div>
187
+ ```