idmission-web-sdk 1.0.54 → 1.0.55

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.
@@ -48,7 +48,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
48
48
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
49
49
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
50
50
 
51
- var webSdkVersion = '1.0.54';
51
+ var webSdkVersion = '1.0.55';
52
52
 
53
53
  function getPlatform() {
54
54
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -1351,7 +1351,6 @@ function listAvailableCameras(facingMode, requestMicAccess) {
1351
1351
  return tslib.__generator(this, function (_a) {
1352
1352
  switch (_a.label) {
1353
1353
  case 0:
1354
- _a.trys.push([0, 2,, 3]);
1355
1354
  return [4 /*yield*/, navigator.mediaDevices.getUserMedia({
1356
1355
  video: {
1357
1356
  facingMode: {
@@ -1359,17 +1358,13 @@ function listAvailableCameras(facingMode, requestMicAccess) {
1359
1358
  }
1360
1359
  },
1361
1360
  audio: requestMicAccess
1362
- })];
1361
+ })
1362
+ // This lists all available cameras attached to the user's device.
1363
+ ];
1363
1364
  case 1:
1364
- // The first thing we need to do is call getUserMedia() so that the subsequent call to enumerateDevices() works.
1365
1365
  cameraEnumerationStream = _a.sent();
1366
- return [3 /*break*/, 3];
1367
- case 2:
1368
- _a.sent();
1369
- return [2 /*return*/, []];
1370
- case 3:
1371
1366
  return [4 /*yield*/, navigator.mediaDevices.enumerateDevices()];
1372
- case 4:
1367
+ case 2:
1373
1368
  videoDevices = _a.sent().filter(function (_a) {
1374
1369
  var kind = _a.kind;
1375
1370
  return kind === 'videoinput';
@@ -1531,7 +1526,10 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1531
1526
  if (e.name === 'NotAllowedError') {
1532
1527
  console.error('camera access has been blocked by the user', e);
1533
1528
  setCameraAccessDenied(true);
1534
- } else throw e;
1529
+ } else {
1530
+ console.error('camera access encountered some other error', e);
1531
+ throw e;
1532
+ }
1535
1533
  });
1536
1534
  }, [cameraAccessDenied, iphoneContinuityCameraAllowed, iphoneContinuityCameraDenied, preferFrontFacingCamera]);
1537
1535
  React.useEffect(function () {
@@ -1545,7 +1543,7 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1545
1543
  if (!((_a = navigator.mediaDevices) === null || _a === void 0 ? void 0 : _a.getUserMedia)) return cleanup;
1546
1544
  (function () {
1547
1545
  return tslib.__awaiter(void 0, void 0, void 0, function () {
1548
- var stream, e_2, handleStreamEnded;
1546
+ var stream, e_1, handleStreamEnded;
1549
1547
  var _a;
1550
1548
  return tslib.__generator(this, function (_b) {
1551
1549
  switch (_b.label) {
@@ -1570,8 +1568,8 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1570
1568
  stream = _b.sent();
1571
1569
  return [3 /*break*/, 4];
1572
1570
  case 3:
1573
- e_2 = _b.sent();
1574
- if (e_2.name === 'NotAllowedError') {
1571
+ e_1 = _b.sent();
1572
+ if (e_1.name === 'NotAllowedError') {
1575
1573
  if (iphoneContinuityCameraAllowed) {
1576
1574
  setIphoneContinuityCameraAvailable(false);
1577
1575
  setIphoneContinuityCameraDenied(true);