@ekyc_qoobiss/qbs-ect-cmp 3.6.38 → 3.6.40

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.
@@ -4516,24 +4516,12 @@ class Stream {
4516
4516
  this.idDetection = val;
4517
4517
  this.faceDetection = !val;
4518
4518
  }
4519
- // public setProbabilityThreshold(val: number): void {
4520
- // Detector.getInstance().setProbabilityThreshold(val);
4521
- // }
4522
- setCallbackChangeTitle(fun) {
4523
- this.callbackChangeTitle = fun;
4524
- }
4525
4519
  setCallbackVideoStarted(fun) {
4526
4520
  this.callbackVideoStarted = fun;
4527
4521
  }
4528
- setCallbackErrors(fun) {
4529
- this.callbackErrors = fun;
4530
- }
4531
4522
  setCallbackAutoCapturing(fun) {
4532
4523
  this.callbackAutoCapturing = fun;
4533
4524
  }
4534
- // public setCallbackFaceDetectionErrors(fun: (e: PipelineResult) => void): void {
4535
- // this.callbackFaceDetectionErrors = fun;
4536
- // }
4537
4525
  setCallbackRecordingReady(fun) {
4538
4526
  this.callbackRecordingReady = fun;
4539
4527
  }
@@ -4547,13 +4535,6 @@ class Stream {
4547
4535
  this.streamPaused = false;
4548
4536
  this.recordedChunks = [];
4549
4537
  this.videoSize = { width: 0, height: 0 };
4550
- this.pauseStream = () => {
4551
- this.streamPaused = true;
4552
- this.mediaRecorder.pause();
4553
- this.videoElement.pause();
4554
- // this.dropMask();
4555
- // if (this.faceDetection) Detector.getInstance().stopDetector();
4556
- };
4557
4538
  this.initFacePose();
4558
4539
  this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
4559
4540
  this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
@@ -4565,9 +4546,6 @@ class Stream {
4565
4546
  }
4566
4547
  return Stream.instance;
4567
4548
  }
4568
- // public returnErrors(errors: PipelineResult) {
4569
- // this.callbackFaceDetectionErrors(errors);
4570
- // }
4571
4549
  autoCapturing() {
4572
4550
  this.callbackAutoCapturing();
4573
4551
  }
@@ -4583,7 +4561,6 @@ class Stream {
4583
4561
  this.idML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
4584
4562
  this.faceML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
4585
4563
  }
4586
- static orientationChange() { }
4587
4564
  startStream(stream) {
4588
4565
  if (this.stream)
4589
4566
  this.stream.getTracks().forEach((track) => track.stop());
@@ -4615,13 +4592,6 @@ class Stream {
4615
4592
  this.startStream(stream);
4616
4593
  this.recordStream();
4617
4594
  }
4618
- async resumeStream() {
4619
- this.streamPaused = false;
4620
- this.mediaRecorder.resume();
4621
- await this.videoElement.play();
4622
- // this.drawMask();
4623
- // if (this.faceDetection) await Detector.getInstance().startDetector();
4624
- }
4625
4595
  recordStream() {
4626
4596
  if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
4627
4597
  return;
@@ -4661,7 +4631,6 @@ class Stream {
4661
4631
  if (this.mediaRecorder && this.mediaRecorder.state != 'inactive') {
4662
4632
  this.mediaRecorder.stop();
4663
4633
  }
4664
- // if (this.faceDetection) Detector.getInstance().stopDetector();
4665
4634
  }
4666
4635
  streamStopped() {
4667
4636
  return !(this.stream && this.stream.getTracks && this.stream.getTracks().length > 0);
@@ -4684,15 +4653,13 @@ class Stream {
4684
4653
  }
4685
4654
  catch (e) {
4686
4655
  resolve(frame);
4687
- this.callbackErrors(e, false);
4656
+ this.timeElapsed();
4688
4657
  }
4689
4658
  }
4690
4659
  else {
4691
4660
  resolve(frame);
4692
4661
  }
4693
4662
  }, ImageFormat.PNG, 1);
4694
- //let outCanvContext = this.canvasElement.getContext('2d');
4695
- //outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
4696
4663
  });
4697
4664
  }
4698
4665
  async startIdDetection() {
@@ -4708,22 +4675,9 @@ class Stream {
4708
4675
  initFacePose() {
4709
4676
  this.facePose = FacePosePick.randomEnum(FacePose);
4710
4677
  }
4711
- requestFacePose() {
4712
- // var pose = FacePose.TiltLeft;
4713
- this.callbackChangeTitle(this.facePose);
4714
- return this.facePose;
4715
- }
4716
- changeFacePose() {
4717
- this.callbackChangeTitle(null);
4718
- }
4719
- changeIDPose(pose) {
4720
- this.callbackChangeTitle(pose);
4721
- }
4722
4678
  }
4723
4679
  Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
4724
- Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
4725
- window.addEventListener('resize', Stream.orientationChange, false);
4726
- window.addEventListener('orientationchange', Stream.orientationChange, false);
4680
+ Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
4727
4681
 
4728
4682
  const cameraCss = ".camera{width:100%;height:100%;color:white;display:flex;align-items:center;justify-content:center;position:relative}.cameraCanvas,.cameraCanvasSelfie,.cameraCanvasSelfieDesk{z-index:3;max-width:100%;max-height:100%;border-radius:10px}.cameraCanvasSelfie,.cameraCanvasSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraVideo,.cameraVideoSelfie,.cameraVideoSelfieDesk{z-index:2;position:absolute;max-width:100%;max-height:100%;border-radius:10px}.cameraVideoSelfie,.cameraVideoSelfieDesk{transform:scale(-1, 1);-webkit-transform:scale(-1, 1)}.cameraMobile{position:fixed;top:0;left:0;background:black}";
4729
4683
 
@@ -4731,23 +4685,11 @@ const Camera = class {
4731
4685
  constructor(hostRef) {
4732
4686
  registerInstance(this, hostRef);
4733
4687
  this.eventVideoStarted = createEvent(this, "videoStarted", 7);
4734
- this.eventCloseCamera = createEvent(this, "closeCamera", 7);
4735
- this.errorCameraEvent = createEvent(this, "errorCamera", 7);
4736
4688
  this.eventTakePhoto = createEvent(this, "takePhoto", 7);
4737
4689
  this.eventRecordingSelfieReady = createEvent(this, "recordingSelfieCapture", 7);
4738
4690
  this.eventRecordingIdReady = createEvent(this, "recordingIdCapture", 7);
4739
4691
  this.eventTimeElapsed = createEvent(this, "timeElapsed", 7);
4740
- this.eventChangeTitle = createEvent(this, "changeTitle", 7);
4741
4692
  this.verificationFinished = createEvent(this, "verificationFinished", 7);
4742
- this.callbackErrors = (error, isError) => {
4743
- if (isError) {
4744
- this.errorCameraEvent.emit(error);
4745
- this.eventCloseCamera.emit();
4746
- }
4747
- else {
4748
- this.errorCameraEvent.emit(error);
4749
- }
4750
- };
4751
4693
  this.callbackAutoCapturing = () => {
4752
4694
  this.eventTakePhoto.emit();
4753
4695
  };
@@ -4763,9 +4705,6 @@ const Camera = class {
4763
4705
  this.callbackTimeElapsed = () => {
4764
4706
  this.eventTimeElapsed.emit();
4765
4707
  };
4766
- this.callbackChangeTitle = (message) => {
4767
- this.eventChangeTitle.emit(message);
4768
- };
4769
4708
  this.callbackVideoStarted = () => {
4770
4709
  this.eventVideoStarted.emit(this.component.getBoundingClientRect());
4771
4710
  };
@@ -4808,9 +4747,7 @@ const Camera = class {
4808
4747
  stream.setCallbackRecordingReady(this.callbackIdRecordingReady);
4809
4748
  // stream.setShowMask(false);
4810
4749
  }
4811
- stream.setCallbackErrors(this.callbackErrors);
4812
4750
  stream.setCallbackAutoCapturing(this.callbackAutoCapturing);
4813
- stream.setCallbackChangeTitle(this.callbackChangeTitle);
4814
4751
  stream.setCallbackVideoStarted(this.callbackVideoStarted);
4815
4752
  stream.setCallbackTimeElapsed(this.callbackTimeElapsed);
4816
4753
  stream.setVerificationFinished(this.callbackVerificationFinished);
@@ -5574,7 +5511,7 @@ function v4(options, buf, offset) {
5574
5511
  }
5575
5512
 
5576
5513
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
5577
- const version$1 = "3.6.38";
5514
+ const version$1 = "3.6.40";
5578
5515
  const description = "Person Identification Component";
5579
5516
  const main = "./dist/index.cjs.js";
5580
5517
  const module = "./dist/index.js";
@@ -9077,11 +9014,11 @@ const ProcessId = class {
9077
9014
  let frontRec = new File([idRecording], this.flow.front.recName + mimeType.extension, { type: mimeType.type });
9078
9015
  this.flow.front.recordingDone = await this.uploadRecording(this.flow.front.recType, frontRec);
9079
9016
  }
9080
- else if (this.flow.back && this.captureStep == IdCaptureFlowStatus.IdBack) {
9017
+ else if (this.captureStep == IdCaptureFlowStatus.IdBack) {
9081
9018
  let backRec = new File([idRecording], this.flow.back.recName + mimeType.extension, { type: mimeType.type });
9082
9019
  this.flow.back.recordingDone = await this.uploadRecording(this.flow.back.recType, backRec);
9083
9020
  }
9084
- else if (this.flow.tilt && this.captureStep == IdCaptureFlowStatus.Tilt) {
9021
+ else if (this.captureStep == IdCaptureFlowStatus.Tilt) {
9085
9022
  let tiltRec = new File([idRecording], this.flow.tilt.recName + mimeType.extension, { type: mimeType.type });
9086
9023
  this.flow.tilt.recordingDone = await this.uploadRecording(this.flow.tilt.recType, tiltRec);
9087
9024
  }
@@ -9134,11 +9071,11 @@ const ProcessId = class {
9134
9071
  this.flow.front.photoDone = false;
9135
9072
  this.flow.front.recordingDone = false;
9136
9073
  }
9137
- if (this.flow.back && this.captureStep == IdCaptureFlowStatus.IdBack) {
9074
+ if (this.captureStep == IdCaptureFlowStatus.IdBack) {
9138
9075
  this.flow.back.photoDone = false;
9139
9076
  this.flow.back.recordingDone = false;
9140
9077
  }
9141
- if (this.flow.tilt && this.captureStep == IdCaptureFlowStatus.Tilt) {
9078
+ if (this.captureStep == IdCaptureFlowStatus.Tilt) {
9142
9079
  this.flow.tilt.photoDone = true;
9143
9080
  this.flow.tilt.recordingDone = false;
9144
9081
  }
@@ -9161,7 +9098,7 @@ const ProcessId = class {
9161
9098
  return;
9162
9099
  }
9163
9100
  }
9164
- if (this.flow.back && this.captureStep == IdCaptureFlowStatus.IdBack && state.hasIdBack) {
9101
+ if (this.captureStep == IdCaptureFlowStatus.IdBack && state.hasIdBack) {
9165
9102
  if (this.flow.back.photoDone && this.flow.back.recordingDone) {
9166
9103
  if (state.hasIdTilt) {
9167
9104
  this.captureStep = IdCaptureFlowStatus.Tilt;
@@ -9174,7 +9111,7 @@ const ProcessId = class {
9174
9111
  return;
9175
9112
  }
9176
9113
  }
9177
- if (this.flow.tilt && this.captureStep == IdCaptureFlowStatus.Tilt && state.hasIdTilt) {
9114
+ if (this.captureStep == IdCaptureFlowStatus.Tilt && state.hasIdTilt) {
9178
9115
  if (this.flow.tilt.photoDone && this.flow.tilt.recordingDone) {
9179
9116
  this.captureStep = IdCaptureFlowStatus.End;
9180
9117
  }
@@ -9225,6 +9162,7 @@ const ProcessId = class {
9225
9162
  if (this.captureStep == IdCaptureFlowStatus.Tilt) {
9226
9163
  return tiltCapture;
9227
9164
  }
9165
+ return h("div", null);
9228
9166
  }
9229
9167
  };
9230
9168
  ProcessId.style = processIdCss;
@@ -9682,7 +9620,7 @@ const UserLiveness = class {
9682
9620
  else {
9683
9621
  this.triggerErrorFlow();
9684
9622
  }
9685
- await this.endFlow();
9623
+ this.endFlow();
9686
9624
  }
9687
9625
  catch (e) {
9688
9626
  if (this.recordingRetryCount < 3) {
@@ -9695,7 +9633,7 @@ const UserLiveness = class {
9695
9633
  }
9696
9634
  }
9697
9635
  async verificationFinished(_event) {
9698
- await this.endFlow();
9636
+ this.endFlow();
9699
9637
  }
9700
9638
  async disconnectedCallback() {
9701
9639
  await this.baseComponent.finalize();
@@ -9706,7 +9644,7 @@ const UserLiveness = class {
9706
9644
  }
9707
9645
  this.flow.front.photoDone = await this.baseComponent.apiCall.UploadFileForRequestB64(state.requestId, photoType, photoFile);
9708
9646
  if (this.flow.front.photoDone) {
9709
- await this.endFlow();
9647
+ this.endFlow();
9710
9648
  }
9711
9649
  else {
9712
9650
  this.triggerErrorFlow();
@@ -9725,7 +9663,7 @@ const UserLiveness = class {
9725
9663
  triggerErrorFlow() {
9726
9664
  this.showError = true;
9727
9665
  }
9728
- async endFlow() {
9666
+ endFlow() {
9729
9667
  if (this.captureStep == SelfieFlowStatus.Selfie) {
9730
9668
  if (this.flow.front.photoDone && this.flow.front.recordingDone) {
9731
9669
  if (state.hasSelfieGesture) {
@@ -9769,7 +9707,7 @@ const UserLiveness = class {
9769
9707
  if (this.captureStep == SelfieFlowStatus.Gesture) {
9770
9708
  return tilt;
9771
9709
  }
9772
- return capture;
9710
+ return h("div", null);
9773
9711
  }
9774
9712
  };
9775
9713
  UserLiveness.style = userLivenessCss;