@ekyc_qoobiss/qbs-ect-cmp 2.1.18 → 2.1.19

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.
@@ -5418,6 +5418,7 @@ 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] : '';
@@ -5428,6 +5429,7 @@ class Cameras {
5428
5429
  height: settings.height,
5429
5430
  width: settings.width,
5430
5431
  frameRate: Number(settings.frameRate.max),
5432
+ focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
5431
5433
  torch: false,
5432
5434
  recommended: false,
5433
5435
  facingMode: facingMode,
@@ -5443,6 +5445,7 @@ class Cameras {
5443
5445
  height: capabilities.height.max,
5444
5446
  width: capabilities.width.max,
5445
5447
  frameRate: Number(capabilities.frameRate.max),
5448
+ focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
5446
5449
  torch: capabilities.torch,
5447
5450
  recommended: false,
5448
5451
  facingMode: facingMode,
@@ -5455,7 +5458,7 @@ class Cameras {
5455
5458
  }
5456
5459
  if (allDevices.length > 0) {
5457
5460
  allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
5458
- var firstOption = allDevices.find(i => i.name.indexOf('0,') != -1 && i.facingMode === 'environment');
5461
+ var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
5459
5462
  if (firstOption) {
5460
5463
  allDevices[allDevices.indexOf(firstOption)].recommended = true;
5461
5464
  }
@@ -5922,7 +5925,7 @@ const IdDoubleSide = class {
5922
5925
  state.flowStatus = FlowStatus.LIVENESS;
5923
5926
  }
5924
5927
  switchCamera() {
5925
- if (this.captureRetryCount == 2) {
5928
+ if (this.captureRetryCount == 1) {
5926
5929
  let camIndex = state.cameraIds.indexOf(state.cameraId);
5927
5930
  state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
5928
5931
  this.captureRetryCount = 0;
@@ -6057,7 +6060,7 @@ const IdSingleSide = class {
6057
6060
  state.flowStatus = FlowStatus.LIVENESS;
6058
6061
  }
6059
6062
  switchCamera() {
6060
- if (this.captureRetryCount == 2) {
6063
+ if (this.captureRetryCount == 1) {
6061
6064
  let camIndex = state.cameraIds.indexOf(state.cameraId);
6062
6065
  state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
6063
6066
  this.captureRetryCount = 0;
@@ -6175,7 +6178,7 @@ function v4(options, buf, offset) {
6175
6178
  }
6176
6179
 
6177
6180
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6178
- const version$1 = "2.1.18";
6181
+ const version$1 = "2.1.19";
6179
6182
  const description = "Person Identification Component";
6180
6183
  const main = "./dist/index.cjs.js";
6181
6184
  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 == 2) {
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 == 2) {
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,6 +8,7 @@ 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] : '';
@@ -18,6 +19,7 @@ export class Cameras {
18
19
  height: settings.height,
19
20
  width: settings.width,
20
21
  frameRate: Number(settings.frameRate.max),
22
+ focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
21
23
  torch: false,
22
24
  recommended: false,
23
25
  facingMode: facingMode,
@@ -33,6 +35,7 @@ export class Cameras {
33
35
  height: capabilities.height.max,
34
36
  width: capabilities.width.max,
35
37
  frameRate: Number(capabilities.frameRate.max),
38
+ focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
36
39
  torch: capabilities.torch,
37
40
  recommended: false,
38
41
  facingMode: facingMode,
@@ -45,7 +48,7 @@ export class Cameras {
45
48
  }
46
49
  if (allDevices.length > 0) {
47
50
  allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
48
- var firstOption = allDevices.find(i => i.name.indexOf('0,') != -1 && i.facingMode === 'environment');
51
+ var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
49
52
  if (firstOption) {
50
53
  allDevices[allDevices.indexOf(firstOption)].recommended = true;
51
54
  }
@@ -5414,6 +5414,7 @@ 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] : '';
@@ -5424,6 +5425,7 @@ class Cameras {
5424
5425
  height: settings.height,
5425
5426
  width: settings.width,
5426
5427
  frameRate: Number(settings.frameRate.max),
5428
+ focusModes: (_a = settings.focusMode) !== null && _a !== void 0 ? _a : [],
5427
5429
  torch: false,
5428
5430
  recommended: false,
5429
5431
  facingMode: facingMode,
@@ -5439,6 +5441,7 @@ class Cameras {
5439
5441
  height: capabilities.height.max,
5440
5442
  width: capabilities.width.max,
5441
5443
  frameRate: Number(capabilities.frameRate.max),
5444
+ focusModes: (_b = capabilities.focusMode) !== null && _b !== void 0 ? _b : [],
5442
5445
  torch: capabilities.torch,
5443
5446
  recommended: false,
5444
5447
  facingMode: facingMode,
@@ -5451,7 +5454,7 @@ class Cameras {
5451
5454
  }
5452
5455
  if (allDevices.length > 0) {
5453
5456
  allDevices = allDevices.sort((a, b) => b.frameRate - a.frameRate);
5454
- var firstOption = allDevices.find(i => i.name.indexOf('0,') != -1 && i.facingMode === 'environment');
5457
+ var firstOption = allDevices.find(i => i.focusModes.length > 1 && i.facingMode === 'environment');
5455
5458
  if (firstOption) {
5456
5459
  allDevices[allDevices.indexOf(firstOption)].recommended = true;
5457
5460
  }
@@ -5918,7 +5921,7 @@ const IdDoubleSide = class {
5918
5921
  state.flowStatus = FlowStatus.LIVENESS;
5919
5922
  }
5920
5923
  switchCamera() {
5921
- if (this.captureRetryCount == 2) {
5924
+ if (this.captureRetryCount == 1) {
5922
5925
  let camIndex = state.cameraIds.indexOf(state.cameraId);
5923
5926
  state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
5924
5927
  this.captureRetryCount = 0;
@@ -6053,7 +6056,7 @@ const IdSingleSide = class {
6053
6056
  state.flowStatus = FlowStatus.LIVENESS;
6054
6057
  }
6055
6058
  switchCamera() {
6056
- if (this.captureRetryCount == 2) {
6059
+ if (this.captureRetryCount == 1) {
6057
6060
  let camIndex = state.cameraIds.indexOf(state.cameraId);
6058
6061
  state.cameraId = camIndex === state.cameraIds.length - 1 ? state.cameraIds[0] : state.cameraIds[camIndex + 1];
6059
6062
  this.captureRetryCount = 0;
@@ -6171,7 +6174,7 @@ function v4(options, buf, offset) {
6171
6174
  }
6172
6175
 
6173
6176
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6174
- const version$1 = "2.1.18";
6177
+ const version$1 = "2.1.19";
6175
6178
  const description = "Person Identification Component";
6176
6179
  const main = "./dist/index.cjs.js";
6177
6180
  const module = "./dist/index.js";