idmission-web-sdk 1.0.35 → 1.0.37

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.
@@ -50,7 +50,7 @@ var tf__namespace = /*#__PURE__*/_interopNamespace(tf);
50
50
  var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
51
51
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
52
52
 
53
- var webSdkVersion = '1.0.35';
53
+ var webSdkVersion = '1.0.37';
54
54
 
55
55
  function getPlatform() {
56
56
  return window.platform;
@@ -1607,7 +1607,6 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1607
1607
  track.onended = handleStreamEnded;
1608
1608
  });
1609
1609
  cameraRef.current = obtainCameraAccess(stream, videoDevice.label, videoRef.current);
1610
- setCameraReady(true);
1611
1610
  return [2];
1612
1611
  }
1613
1612
  });
@@ -1615,6 +1614,12 @@ var useHighestResCaptureDevice = function useHighestResCaptureDevice(_a) {
1615
1614
  })();
1616
1615
  return cleanup;
1617
1616
  }, [iphoneContinuityCameraAllowed, iphoneContinuityCameraAvailable, requestMicrophoneAccess, videoDevice]);
1617
+ React.useEffect(function () {
1618
+ setCameraReady(false);
1619
+ if (videoDevice && videoLoaded) {
1620
+ setCameraReady(true);
1621
+ }
1622
+ }, [videoLoaded, videoDevice]);
1618
1623
  var takePhoto = React.useCallback(function () {
1619
1624
  return tslib.__awaiter(void 0, void 0, void 0, function () {
1620
1625
  var canvas, ctx, photoURL, data;