@ekyc_qoobiss/qbs-ect-cmp 2.1.18 → 2.1.20
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/dist/cjs/agreement-check_18.cjs.entry.js +11 -6
- package/dist/collection/components/flow/id-double-side/id-double-side.js +1 -1
- package/dist/collection/components/flow/id-single-side/id-single-side.js +1 -1
- package/dist/collection/helpers/Cameras.js +8 -3
- package/dist/esm/agreement-check_18.entry.js +11 -6
- package/dist/qbs-ect-cmp/{p-0ae76281.entry.js → p-b5795b90.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/models/ICamera.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5418,16 +5418,19 @@ class Cameras {
|
|
|
5418
5418
|
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
5419
5419
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
5420
5420
|
stream.getVideoTracks().forEach(track => {
|
|
5421
|
+
var _a, _b;
|
|
5421
5422
|
if (deviceInfo.isFirefox) {
|
|
5422
5423
|
const settings = track.getSettings();
|
|
5423
5424
|
let facingMode = settings.facingMode && settings.facingMode.length > 0 ? settings.facingMode[0] : '';
|
|
5424
5425
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
5426
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
5425
5427
|
allDevices.push({
|
|
5426
5428
|
deviceId: device.deviceId,
|
|
5427
5429
|
name: device.label,
|
|
5428
5430
|
height: settings.height,
|
|
5429
5431
|
width: settings.width,
|
|
5430
5432
|
frameRate: Number(settings.frameRate.max),
|
|
5433
|
+
focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
|
|
5431
5434
|
torch: false,
|
|
5432
5435
|
recommended: false,
|
|
5433
5436
|
facingMode: facingMode,
|
|
@@ -5437,12 +5440,14 @@ class Cameras {
|
|
|
5437
5440
|
const capabilities = track.getCapabilities();
|
|
5438
5441
|
let facingMode = capabilities.facingMode && capabilities.facingMode.length > 0 ? capabilities.facingMode[0] : '';
|
|
5439
5442
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
5443
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
5440
5444
|
allDevices.push({
|
|
5441
5445
|
deviceId: device.deviceId,
|
|
5442
5446
|
name: device.label,
|
|
5443
5447
|
height: capabilities.height.max,
|
|
5444
5448
|
width: capabilities.width.max,
|
|
5445
5449
|
frameRate: Number(capabilities.frameRate.max),
|
|
5450
|
+
focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
|
|
5446
5451
|
torch: capabilities.torch,
|
|
5447
5452
|
recommended: false,
|
|
5448
5453
|
facingMode: facingMode,
|
|
@@ -5455,7 +5460,7 @@ class Cameras {
|
|
|
5455
5460
|
}
|
|
5456
5461
|
if (allDevices.length > 0) {
|
|
5457
5462
|
allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
|
|
5458
|
-
var firstOption = allDevices.find(i => i.
|
|
5463
|
+
var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
|
|
5459
5464
|
if (firstOption) {
|
|
5460
5465
|
allDevices[allDevices.indexOf(firstOption)].recommended = true;
|
|
5461
5466
|
}
|
|
@@ -5509,10 +5514,10 @@ class Cameras {
|
|
|
5509
5514
|
static async InitCameras(device) {
|
|
5510
5515
|
try {
|
|
5511
5516
|
let cam = new Cameras();
|
|
5512
|
-
let cameras = await cam.GetCameras(device);
|
|
5517
|
+
let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
|
|
5513
5518
|
var recommCamera = cam.GetRecommendedCamera(cameras);
|
|
5514
5519
|
state.cameraIds = cameras.map(camera => camera.deviceId);
|
|
5515
|
-
state.cameraId = recommCamera.deviceId;
|
|
5520
|
+
state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
5516
5521
|
return true;
|
|
5517
5522
|
}
|
|
5518
5523
|
catch (e) {
|
|
@@ -5922,7 +5927,7 @@ const IdDoubleSide = class {
|
|
|
5922
5927
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
5923
5928
|
}
|
|
5924
5929
|
switchCamera() {
|
|
5925
|
-
if (this.captureRetryCount ==
|
|
5930
|
+
if (this.captureRetryCount == 1) {
|
|
5926
5931
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
5927
5932
|
state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
|
|
5928
5933
|
this.captureRetryCount = 0;
|
|
@@ -6057,7 +6062,7 @@ const IdSingleSide = class {
|
|
|
6057
6062
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6058
6063
|
}
|
|
6059
6064
|
switchCamera() {
|
|
6060
|
-
if (this.captureRetryCount ==
|
|
6065
|
+
if (this.captureRetryCount == 1) {
|
|
6061
6066
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
6062
6067
|
state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
|
|
6063
6068
|
this.captureRetryCount = 0;
|
|
@@ -6175,7 +6180,7 @@ function v4(options, buf, offset) {
|
|
|
6175
6180
|
}
|
|
6176
6181
|
|
|
6177
6182
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6178
|
-
const version$1 = "2.1.
|
|
6183
|
+
const version$1 = "2.1.20";
|
|
6179
6184
|
const description = "Person Identification Component";
|
|
6180
6185
|
const main = "./dist/index.cjs.js";
|
|
6181
6186
|
const module$1 = "./dist/index.js";
|
|
@@ -167,7 +167,7 @@ export class IdDoubleSide {
|
|
|
167
167
|
store.flowStatus = FlowStatus.LIVENESS;
|
|
168
168
|
}
|
|
169
169
|
switchCamera() {
|
|
170
|
-
if (this.captureRetryCount ==
|
|
170
|
+
if (this.captureRetryCount == 1) {
|
|
171
171
|
let camIndex = store.cameraIds.indexOf(store.cameraId);
|
|
172
172
|
store.cameraId = camIndex === store.cameraIds.length - 1 ? store.cameraIds[0] : store.cameraIds[camIndex + 1];
|
|
173
173
|
this.captureRetryCount = 0;
|
|
@@ -117,7 +117,7 @@ export class IdSingleSide {
|
|
|
117
117
|
store.flowStatus = FlowStatus.LIVENESS;
|
|
118
118
|
}
|
|
119
119
|
switchCamera() {
|
|
120
|
-
if (this.captureRetryCount ==
|
|
120
|
+
if (this.captureRetryCount == 1) {
|
|
121
121
|
let camIndex = store.cameraIds.indexOf(store.cameraId);
|
|
122
122
|
store.cameraId = camIndex === store.cameraIds.length - 1 ? store.cameraIds[0] : store.cameraIds[camIndex + 1];
|
|
123
123
|
this.captureRetryCount = 0;
|
|
@@ -8,16 +8,19 @@ export class Cameras {
|
|
|
8
8
|
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
9
9
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
10
10
|
stream.getVideoTracks().forEach(track => {
|
|
11
|
+
var _a, _b;
|
|
11
12
|
if (deviceInfo.isFirefox) {
|
|
12
13
|
const settings = track.getSettings();
|
|
13
14
|
let facingMode = settings.facingMode && settings.facingMode.length > 0 ? settings.facingMode[0] : '';
|
|
14
15
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
16
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
15
17
|
allDevices.push({
|
|
16
18
|
deviceId: device.deviceId,
|
|
17
19
|
name: device.label,
|
|
18
20
|
height: settings.height,
|
|
19
21
|
width: settings.width,
|
|
20
22
|
frameRate: Number(settings.frameRate.max),
|
|
23
|
+
focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
|
|
21
24
|
torch: false,
|
|
22
25
|
recommended: false,
|
|
23
26
|
facingMode: facingMode,
|
|
@@ -27,12 +30,14 @@ export class Cameras {
|
|
|
27
30
|
const capabilities = track.getCapabilities();
|
|
28
31
|
let facingMode = capabilities.facingMode && capabilities.facingMode.length > 0 ? capabilities.facingMode[0] : '';
|
|
29
32
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
33
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
30
34
|
allDevices.push({
|
|
31
35
|
deviceId: device.deviceId,
|
|
32
36
|
name: device.label,
|
|
33
37
|
height: capabilities.height.max,
|
|
34
38
|
width: capabilities.width.max,
|
|
35
39
|
frameRate: Number(capabilities.frameRate.max),
|
|
40
|
+
focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
|
|
36
41
|
torch: capabilities.torch,
|
|
37
42
|
recommended: false,
|
|
38
43
|
facingMode: facingMode,
|
|
@@ -45,7 +50,7 @@ export class Cameras {
|
|
|
45
50
|
}
|
|
46
51
|
if (allDevices.length > 0) {
|
|
47
52
|
allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
|
|
48
|
-
var firstOption = allDevices.find(i => i.
|
|
53
|
+
var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
|
|
49
54
|
if (firstOption) {
|
|
50
55
|
allDevices[allDevices.indexOf(firstOption)].recommended = true;
|
|
51
56
|
}
|
|
@@ -99,10 +104,10 @@ export class Cameras {
|
|
|
99
104
|
static async InitCameras(device) {
|
|
100
105
|
try {
|
|
101
106
|
let cam = new Cameras();
|
|
102
|
-
let cameras = await cam.GetCameras(device);
|
|
107
|
+
let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
|
|
103
108
|
var recommCamera = cam.GetRecommendedCamera(cameras);
|
|
104
109
|
store.cameraIds = cameras.map(camera => camera.deviceId);
|
|
105
|
-
store.cameraId = recommCamera.deviceId;
|
|
110
|
+
store.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
106
111
|
return true;
|
|
107
112
|
}
|
|
108
113
|
catch (e) {
|
|
@@ -5414,16 +5414,19 @@ class Cameras {
|
|
|
5414
5414
|
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
5415
5415
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
5416
5416
|
stream.getVideoTracks().forEach(track => {
|
|
5417
|
+
var _a, _b;
|
|
5417
5418
|
if (deviceInfo.isFirefox) {
|
|
5418
5419
|
const settings = track.getSettings();
|
|
5419
5420
|
let facingMode = settings.facingMode && settings.facingMode.length > 0 ? settings.facingMode[0] : '';
|
|
5420
5421
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
5422
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
5421
5423
|
allDevices.push({
|
|
5422
5424
|
deviceId: device.deviceId,
|
|
5423
5425
|
name: device.label,
|
|
5424
5426
|
height: settings.height,
|
|
5425
5427
|
width: settings.width,
|
|
5426
5428
|
frameRate: Number(settings.frameRate.max),
|
|
5429
|
+
focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
|
|
5427
5430
|
torch: false,
|
|
5428
5431
|
recommended: false,
|
|
5429
5432
|
facingMode: facingMode,
|
|
@@ -5433,12 +5436,14 @@ class Cameras {
|
|
|
5433
5436
|
const capabilities = track.getCapabilities();
|
|
5434
5437
|
let facingMode = capabilities.facingMode && capabilities.facingMode.length > 0 ? capabilities.facingMode[0] : '';
|
|
5435
5438
|
facingMode = facingMode === 'e' ? 'environment' : facingMode;
|
|
5439
|
+
facingMode = facingMode === 'u' ? 'user' : facingMode;
|
|
5436
5440
|
allDevices.push({
|
|
5437
5441
|
deviceId: device.deviceId,
|
|
5438
5442
|
name: device.label,
|
|
5439
5443
|
height: capabilities.height.max,
|
|
5440
5444
|
width: capabilities.width.max,
|
|
5441
5445
|
frameRate: Number(capabilities.frameRate.max),
|
|
5446
|
+
focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
|
|
5442
5447
|
torch: capabilities.torch,
|
|
5443
5448
|
recommended: false,
|
|
5444
5449
|
facingMode: facingMode,
|
|
@@ -5451,7 +5456,7 @@ class Cameras {
|
|
|
5451
5456
|
}
|
|
5452
5457
|
if (allDevices.length > 0) {
|
|
5453
5458
|
allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
|
|
5454
|
-
var firstOption = allDevices.find(i => i.
|
|
5459
|
+
var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
|
|
5455
5460
|
if (firstOption) {
|
|
5456
5461
|
allDevices[allDevices.indexOf(firstOption)].recommended = true;
|
|
5457
5462
|
}
|
|
@@ -5505,10 +5510,10 @@ class Cameras {
|
|
|
5505
5510
|
static async InitCameras(device) {
|
|
5506
5511
|
try {
|
|
5507
5512
|
let cam = new Cameras();
|
|
5508
|
-
let cameras = await cam.GetCameras(device);
|
|
5513
|
+
let cameras = (await cam.GetCameras(device)).filter(c => c.facingMode == 'environment');
|
|
5509
5514
|
var recommCamera = cam.GetRecommendedCamera(cameras);
|
|
5510
5515
|
state.cameraIds = cameras.map(camera => camera.deviceId);
|
|
5511
|
-
state.cameraId = recommCamera.deviceId;
|
|
5516
|
+
state.cameraId = recommCamera === null || recommCamera === void 0 ? void 0 : recommCamera.deviceId;
|
|
5512
5517
|
return true;
|
|
5513
5518
|
}
|
|
5514
5519
|
catch (e) {
|
|
@@ -5918,7 +5923,7 @@ const IdDoubleSide = class {
|
|
|
5918
5923
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
5919
5924
|
}
|
|
5920
5925
|
switchCamera() {
|
|
5921
|
-
if (this.captureRetryCount ==
|
|
5926
|
+
if (this.captureRetryCount == 1) {
|
|
5922
5927
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
5923
5928
|
state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
|
|
5924
5929
|
this.captureRetryCount = 0;
|
|
@@ -6053,7 +6058,7 @@ const IdSingleSide = class {
|
|
|
6053
6058
|
state.flowStatus = FlowStatus.LIVENESS;
|
|
6054
6059
|
}
|
|
6055
6060
|
switchCamera() {
|
|
6056
|
-
if (this.captureRetryCount ==
|
|
6061
|
+
if (this.captureRetryCount == 1) {
|
|
6057
6062
|
let camIndex = state.cameraIds.indexOf(state.cameraId);
|
|
6058
6063
|
state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
|
|
6059
6064
|
this.captureRetryCount = 0;
|
|
@@ -6171,7 +6176,7 @@ function v4(options, buf, offset) {
|
|
|
6171
6176
|
}
|
|
6172
6177
|
|
|
6173
6178
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6174
|
-
const version$1 = "2.1.
|
|
6179
|
+
const version$1 = "2.1.20";
|
|
6175
6180
|
const description = "Person Identification Component";
|
|
6176
6181
|
const main = "./dist/index.cjs.js";
|
|
6177
6182
|
const module = "./dist/index.js";
|