@unissey-web/web-components 3.10.1-rc.2 → 3.10.2-debug.1

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.
@@ -3,7 +3,7 @@ import { selfieCaptureStrings } from './selfie-capture.js';
3
3
  import { referenceCaptureStrings } from './reference-capture.js';
4
4
  import './button.js';
5
5
  import './en-e76ed5a0.js';
6
- import './video-recorder-dd2c552e.js';
6
+ import './video-recorder-87b59e39.js';
7
7
  import './_commonjsHelpers-cef27602.js';
8
8
  import './variables-09a3e162.js';
9
9
  import './video-record-directions.js';
package/dist/index.d.ts CHANGED
@@ -1092,10 +1092,27 @@ type VideoLength = {
1092
1092
  type: "frame-count";
1093
1093
  frameCount: number;
1094
1094
  };
1095
+ type FaceRect = FaceCenter & FaceSize;
1096
+ interface FaceCenter {
1097
+ x: number;
1098
+ y: number;
1099
+ }
1100
+ interface FaceSize {
1101
+ w: number;
1102
+ h: number;
1103
+ }
1104
+ type FaceCheckerConfig = {
1105
+ check: "disabled";
1106
+ } | {
1107
+ check: "beforeRecording" | "whileRecording";
1108
+ customFaceArea?: FaceRect;
1109
+ noFaceIssueDelayMs?: number;
1110
+ };
1095
1111
  interface RecordingConfig {
1096
1112
  audio: boolean;
1097
1113
  bitRateKbps: number;
1098
1114
  length: VideoLength;
1115
+ faceCheckerConfig: FaceCheckerConfig;
1099
1116
  }
1100
1117
  type ColorRGBA = [number, number, number, number];
1101
1118
  type OverlayColors = Record<"background" | "innerBorder" | "progressColor", ColorRGBA>;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { Button } from './button.js';
2
- import { R as Recorder } from './video-recorder-dd2c552e.js';
3
- export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-dd2c552e.js';
2
+ import { R as Recorder } from './video-recorder-87b59e39.js';
3
+ export { C as CameraVideoOutlinedIcon, O as OverlayHints } from './video-recorder-87b59e39.js';
4
4
  export { VideoRecordDirections } from './video-record-directions.js';
5
5
  export { PictureRecorder } from './picture-recorder.js';
6
6
  export { PictureEditor } from './picture-editor.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { R as Recorder, b as buildPacked } from './video-recorder-dd2c552e.js';
3
+ import { R as Recorder, b as buildPacked } from './video-recorder-87b59e39.js';
4
4
  import './_commonjsHelpers-cef27602.js';
5
5
  import './variables-09a3e162.js';
6
6
  import './button.js';
@@ -3,7 +3,7 @@ import './button.js';
3
3
  import './image-capture-directions.js';
4
4
  import './file-upload.js';
5
5
  import './picture-recorder.js';
6
- import { b as buildPacked } from './video-recorder-dd2c552e.js';
6
+ import { b as buildPacked } from './video-recorder-87b59e39.js';
7
7
  import { E as EN } from './en-e76ed5a0.js';
8
8
  import { c as referenceCaptureVars } from './variables-09a3e162.js';
9
9
  import './direction-card-f55e1936.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i } from './lit-element-ac3d3a27.js';
2
2
  import { E as EN } from './en-e76ed5a0.js';
3
- import { b as buildPacked } from './video-recorder-dd2c552e.js';
3
+ import { b as buildPacked } from './video-recorder-87b59e39.js';
4
4
  import './video-record-directions.js';
5
5
  import './button.js';
6
6
  import { s as selfieCaptureVars } from './variables-09a3e162.js';
@@ -5,7 +5,7 @@ import { E as EN } from './en-e76ed5a0.js';
5
5
  import './button.js';
6
6
 
7
7
  var name = "@unissey-web/web-components";
8
- var version = "3.10.1-rc.2";
8
+ var version = "3.10.2-debug.1";
9
9
  var description = "";
10
10
  var module = "./dist/index.js";
11
11
  var typings = "./dist/index.d.ts";
@@ -544,6 +544,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
544
544
  key: "capture",
545
545
  value: function () {
546
546
  var _capture = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
547
+ var _this$config$recordin;
547
548
  var faceCheckerOptions, captureConfig, _yield$this$session$c, media, metadata, error, detail, recordCompletedEvent, recordEvent;
548
549
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
549
550
  while (1) switch (_context3.prev = _context3.next) {
@@ -571,14 +572,16 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
571
572
  faceCheckerOptions = this.faceChecker === "disabled" ? undefined : this.faceChecker === "disabled-on-retry" && this.faceDetectionFails ? {
572
573
  check: "disabled"
573
574
  } : {
574
- check: "beforeRecording"
575
+ check: "beforeRecording",
576
+ noFaceIssueDelayMs: ((_this$config$recordin = this.config.recordingConfig) === null || _this$config$recordin === void 0 || (_this$config$recordin = _this$config$recordin.faceCheckerConfig) === null || _this$config$recordin === void 0 ? void 0 : _this$config$recordin.check) === "beforeRecording" ? this.config.recordingConfig.faceCheckerConfig.noFaceIssueDelayMs : undefined
575
577
  };
576
578
  captureConfig = faceCheckerOptions ? {
577
579
  faceCheckerOptions: faceCheckerOptions
578
580
  } : undefined;
579
- _context3.next = 12;
581
+ console.log("The face checker options for the capture:", captureConfig);
582
+ _context3.next = 13;
580
583
  return this.session.capture(captureConfig);
581
- case 12:
584
+ case 13:
582
585
  _yield$this$session$c = _context3.sent;
583
586
  media = _yield$this$session$c.media;
584
587
  metadata = _yield$this$session$c.metadata;
@@ -599,7 +602,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
599
602
  detail: detail
600
603
  });
601
604
  this.dispatchEvent(recordEvent);
602
- case 26:
605
+ case 27:
603
606
  case "end":
604
607
  return _context3.stop();
605
608
  }
@@ -660,6 +663,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
660
663
  var configChanged = _changedProperties.has("config");
661
664
  var faceCheckerChanged = _changedProperties.has("faceChecker");
662
665
  var instructionsChanged = _changedProperties.has("instructionMessages");
666
+ if (configChanged) console.log("The configuration has been updated:", this.config);
663
667
 
664
668
  // The sdk is initialized only if it is the first rendering or if one of the following attributes changes: preset or config
665
669
  var shouldInitSdk = presetChanged || configChanged || instructionsChanged || faceCheckerChanged;
@@ -854,7 +858,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
854
858
  return _context6.abrupt("return");
855
859
  case 5:
856
860
  if (!(video && cvs)) {
857
- _context6.next = 26;
861
+ _context6.next = 27;
858
862
  break;
859
863
  }
860
864
  this.displaySpinner();
@@ -871,31 +875,32 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
871
875
  this.session = null; // Note: Should be already set to null by sdkJsListener_status()
872
876
  case 12:
873
877
  sessionConfig = this.buildSessionConfig();
874
- _context6.next = 15;
878
+ console.log("The configuration used to create the session:", sessionConfig);
879
+ _context6.next = 16;
875
880
  return buildPacked.exports.UnisseySdk.createSession(video, this.preset, cvs, sessionConfig)["catch"](function (e) {
876
881
  _this3.resetHints();
877
882
  return null;
878
883
  })["finally"](function () {
879
884
  _this3.hideSpinner();
880
885
  });
881
- case 15:
886
+ case 16:
882
887
  this.session = _context6.sent;
883
888
  this.initSessionInprogress = false;
884
889
  if (!this.disconnected) {
885
- _context6.next = 21;
890
+ _context6.next = 22;
886
891
  break;
887
892
  }
888
- _context6.next = 20;
893
+ _context6.next = 21;
889
894
  return (_this$session4 = this.session) === null || _this$session4 === void 0 ? void 0 : _this$session4.release();
890
- case 20:
891
- this.session = null; // Note: Should be already set to null by sdkJsListener_status()
892
895
  case 21:
896
+ this.session = null; // Note: Should be already set to null by sdkJsListener_status()
897
+ case 22:
893
898
  if (this.session) {
894
- _context6.next = 23;
899
+ _context6.next = 24;
895
900
  break;
896
901
  }
897
902
  return _context6.abrupt("return");
898
- case 23:
903
+ case 24:
899
904
  acquisitionTime = this.session.getInfo().acquisition_length;
900
905
  recorderReadyEvent = new CustomEvent("recorderReady", {
901
906
  detail: {
@@ -905,7 +910,7 @@ var Recorder = /*#__PURE__*/function (_LitElement) {
905
910
  }
906
911
  });
907
912
  this.dispatchEvent(recorderReadyEvent);
908
- case 26:
913
+ case 27:
909
914
  case "end":
910
915
  return _context6.stop();
911
916
  }
@@ -1,5 +1,5 @@
1
1
  import './lit-element-ac3d3a27.js';
2
- export { R as Recorder, V as VideoRecorder } from './video-recorder-dd2c552e.js';
2
+ export { R as Recorder, V as VideoRecorder } from './video-recorder-87b59e39.js';
3
3
  import './button.js';
4
4
  import './en-e76ed5a0.js';
5
5
  import './_commonjsHelpers-cef27602.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unissey-web/web-components",
3
- "version": "3.10.1-rc.2",
3
+ "version": "3.10.2-debug.1",
4
4
  "description": "",
5
5
  "module": "./dist/index.js",
6
6
  "typings": "./dist/index.d.ts",