idmission-web-sdk 0.0.13 → 0.0.15

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.
@@ -228,7 +228,7 @@ var templateObject_1$4;
228
228
  var OverlayContainer = styled__default['default'](PageContainer)(templateObject_1$3 || (templateObject_1$3 = tslib.__makeTemplateObject(["\n background: white;\n z-index: 10000;\n"], ["\n background: white;\n z-index: 10000;\n"])));
229
229
  var OverlayInner = styled__default['default'].div(templateObject_2 || (templateObject_2 = tslib.__makeTemplateObject(["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"], ["\n text-align: center;\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n padding: 25px;\n max-height: var(--app-height);\n height: 100%;\n box-sizing: border-box;\n"])));
230
230
  var OverlayImageWrapper = styled__default['default'].div(templateObject_3 || (templateObject_3 = tslib.__makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n max-width: var(--app-width);\n max-height: var(--app-height);\n overflow: hidden;\n\n & > img {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
231
- var OverlayImageMultiContainer = styled__default['default'].div(templateObject_4 || (templateObject_4 = tslib.__makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n }\n }\n"])));
231
+ var OverlayImageMultiContainer = styled__default['default'].div(templateObject_4 || (templateObject_4 = tslib.__makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100vh - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
232
232
  var templateObject_1$3, templateObject_2, templateObject_3, templateObject_4;
233
233
 
234
234
  var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
@@ -2788,8 +2788,14 @@ var reducer$3 = function reducer(state, action) {
2788
2788
  faceNotCentered = Math.abs(vCX - fCX) > vTX || Math.abs(vCY + 50 - fCY) > vTY;
2789
2789
  faceLookingAway = Math.abs(fCX - nose.x) > fTW || Math.abs(fCY - nose.y) > fTH;
2790
2790
  }
2791
- var tooCloseMultiple = isMobile() ? 2 : 4.5;
2792
- var tooFarMultiple = isMobile() ? 6 : 7;
2791
+ var isMobile = state.videoWidth < state.videoHeight;
2792
+ var tooCloseMultiple = isMobile ? 2 : 4.5;
2793
+ var tooFarMultiple = isMobile ? 6 : 7;
2794
+ console.log({
2795
+ faceBoxWidth: face.box.width,
2796
+ videoWidth: state.videoWidth,
2797
+ tooCloseMultiple: tooCloseMultiple
2798
+ });
2793
2799
  faceTooClose = face.box.width > state.videoWidth / tooCloseMultiple;
2794
2800
  faceTooFar = face.box.width < state.videoWidth / tooFarMultiple;
2795
2801
  }