idmission-web-sdk 2.2.36 → 2.2.38

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/sdk2.esm.js CHANGED
@@ -203,7 +203,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
203
203
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
204
204
  };
205
205
 
206
- var webSdkVersion = '2.2.36';
206
+ var webSdkVersion = '2.2.38';
207
207
 
208
208
  function getPlatform() {
209
209
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -3368,12 +3368,12 @@ var createCameraStore = function createCameraStore(config) {
3368
3368
  },
3369
3369
  requestCameraAccess: function requestCameraAccess() {
3370
3370
  return __awaiter(this, void 0, void 0, function () {
3371
- var _a, releaseCameraAccess, preferIphoneContinuityCamera, iphoneContinuityCameraDenied, availableCameras, selectedCamera, platform_1, iphoneContinuityCamera, constraints, stream, e_1, iphoneContinuityCameraAvailable_1, handleStreamEnded_1, camera, e_3;
3371
+ var _a, releaseCameraAccess, preferFrontFacingCamera, preferIphoneContinuityCamera, iphoneContinuityCameraDenied, availableCameras, selectedCamera, platform_1, iphoneContinuityCamera, constraints, stream, e_1, iphoneContinuityCameraAvailable_1, handleStreamEnded_1, camera, e_3;
3372
3372
  var _b, _c, _d;
3373
3373
  return __generator(this, function (_e) {
3374
3374
  switch (_e.label) {
3375
3375
  case 0:
3376
- _a = get(), releaseCameraAccess = _a.releaseCameraAccess, preferIphoneContinuityCamera = _a.preferIphoneContinuityCamera, iphoneContinuityCameraDenied = _a.iphoneContinuityCameraDenied;
3376
+ _a = get(), releaseCameraAccess = _a.releaseCameraAccess, preferFrontFacingCamera = _a.preferFrontFacingCamera, preferIphoneContinuityCamera = _a.preferIphoneContinuityCamera, iphoneContinuityCameraDenied = _a.iphoneContinuityCameraDenied;
3377
3377
  releaseCameraAccess();
3378
3378
  _e.label = 1;
3379
3379
  case 1:
@@ -3403,7 +3403,7 @@ var createCameraStore = function createCameraStore(config) {
3403
3403
  });
3404
3404
  debug('cameras have been sorted', availableCameras);
3405
3405
  }
3406
- if (config.preferFrontFacingCamera) {
3406
+ if (preferFrontFacingCamera) {
3407
3407
  selectedCamera = availableCameras.find(function (deviceInfo) {
3408
3408
  return cameraLabelMatches(deviceInfo, frontCameraLabels);
3409
3409
  });
@@ -3421,7 +3421,7 @@ var createCameraStore = function createCameraStore(config) {
3421
3421
  return cameraLabelMatches(deviceInfo, rearCameraLabels);
3422
3422
  }));
3423
3423
  // on iOS, the front facing camera always is at the first position in the list, so we skip it if all else fails.
3424
- if (!config.preferFrontFacingCamera && ((_c = platform_1 === null || platform_1 === void 0 ? void 0 : platform_1.os) === null || _c === void 0 ? void 0 : _c.family) === 'iOS' && availableCameras.length > 0) {
3424
+ if (!preferFrontFacingCamera && ((_c = platform_1 === null || platform_1 === void 0 ? void 0 : platform_1.os) === null || _c === void 0 ? void 0 : _c.family) === 'iOS' && availableCameras.length > 0) {
3425
3425
  selectedCamera || (selectedCamera = availableCameras[1]);
3426
3426
  }
3427
3427
  selectedCamera || (selectedCamera = availableCameras[0]);
@@ -12570,7 +12570,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
12570
12570
  });
12571
12571
  setCaptureState('CAPTURING_ID');
12572
12572
  }, []);
12573
- var isCapturingId = ['LOADING', 'CAPTURING_ID'].includes(captureState);
12573
+ var isCapturingId = !skipIdCapture && ['LOADING', 'CAPTURING_ID'].includes(captureState);
12574
12574
  useEffect(function () {
12575
12575
  if (submissionStatus === SubmissionStatus.SUBMITTING) releaseCameraAccess();
12576
12576
  }, [submissionStatus]);