@ekyc_qoobiss/qbs-ect-cmp 3.6.4 → 3.6.6

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.
@@ -5236,7 +5236,7 @@ class Stream {
5236
5236
  setVerificationFinished(fun) {
5237
5237
  this.verificationFinished = fun;
5238
5238
  }
5239
- constructor(_modelPath) {
5239
+ constructor() {
5240
5240
  this.streamPaused = false;
5241
5241
  this.recordedChunks = [];
5242
5242
  this.videoSize = { width: 0, height: 0 };
@@ -5250,9 +5250,9 @@ class Stream {
5250
5250
  this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
5251
5251
  this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
5252
5252
  }
5253
- static getInstance(modelPath) {
5253
+ static getInstance() {
5254
5254
  if (!Stream.instance) {
5255
- Stream.instance = new Stream(modelPath);
5255
+ Stream.instance = new Stream();
5256
5256
  }
5257
5257
  return Stream.instance;
5258
5258
  }
@@ -5311,6 +5311,8 @@ class Stream {
5311
5311
  // if (this.faceDetection) await Detector.getInstance().startDetector();
5312
5312
  }
5313
5313
  recordStream() {
5314
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
5315
+ return;
5314
5316
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
5315
5317
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
5316
5318
  if (state.device.mobileOS == MobileOS.iOS || state.device.browser == Browser.Safari)
@@ -5477,8 +5479,6 @@ const Camera = class {
5477
5479
  return (index.h("div", { class: "camera" }, index.h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), index.h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
5478
5480
  }
5479
5481
  startStream() {
5480
- if (!Stream.instance)
5481
- Stream.getInstance(this.modelPath);
5482
5482
  const stream = Stream.getInstance();
5483
5483
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
5484
5484
  if (this.captureMode == 'selfie') {
@@ -5682,7 +5682,6 @@ class Cameras {
5682
5682
  const devices = await navigator.mediaDevices.enumerateDevices();
5683
5683
  const videoDevices = devices.filter(device => device.kind === 'videoinput');
5684
5684
  for (const device of videoDevices) {
5685
- //const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
5686
5685
  const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
5687
5686
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
5688
5687
  stream.getVideoTracks().forEach(track => {
@@ -5759,8 +5758,14 @@ class Cameras {
5759
5758
  else {
5760
5759
  mediaTrack.facingMode = 'user';
5761
5760
  if (portrait) {
5762
- mediaTrack.width = { ideal: 1920 };
5763
- mediaTrack.height = { ideal: 1080 };
5761
+ if (device.isAndroidDevice) {
5762
+ mediaTrack.width = { ideal: 1280 };
5763
+ mediaTrack.height = { ideal: 720 };
5764
+ }
5765
+ else {
5766
+ mediaTrack.width = { ideal: 1920 };
5767
+ mediaTrack.height = { ideal: 1080 };
5768
+ }
5764
5769
  }
5765
5770
  else {
5766
5771
  mediaTrack.facingMode = 'environment';
@@ -5771,27 +5776,6 @@ class Cameras {
5771
5776
  constraints.video = mediaTrack;
5772
5777
  return constraints;
5773
5778
  }
5774
- // public GetConstraintsIOs(device: DeviceState, portrait: boolean = false): MediaStreamConstraints | any {
5775
- // let constraints: MediaStreamConstraints = {
5776
- // audio: false,
5777
- // };
5778
- // let mediaTrack: MediaTrackConstraints = {};
5779
- // if (device.isDesktop) {
5780
- // mediaTrack.width = 1280;
5781
- // } else {
5782
- // if (portrait) {
5783
- // mediaTrack.facingMode = 'user';
5784
- // mediaTrack.width = 1280;
5785
- // mediaTrack.height = 720;
5786
- // } else {
5787
- // mediaTrack.facingMode = 'environment';
5788
- // mediaTrack.width = 1280;
5789
- // mediaTrack.height = 720;
5790
- // }
5791
- // }
5792
- // constraints.video = mediaTrack;
5793
- // return constraints;
5794
- // }
5795
5779
  GetRecommendedCamera(cameras) {
5796
5780
  if (cameras && cameras.length > 0) {
5797
5781
  var recommDevice = cameras.find(c => c.recommended);
@@ -5998,7 +5982,6 @@ const IdCapture = class {
5998
5982
  }
5999
5983
  async openCamera() {
6000
5984
  await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
6001
- //const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
6002
5985
  const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
6003
5986
  setTimeout(() => {
6004
5987
  navigator.mediaDevices
@@ -6070,6 +6053,7 @@ const IdDoubleSide = class {
6070
6053
  constructor(hostRef) {
6071
6054
  index.registerInstance(this, hostRef);
6072
6055
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
6056
+ this.recordingResultCount = 0;
6073
6057
  this.showTimeout = undefined;
6074
6058
  this.showInvalid = undefined;
6075
6059
  this.showHowTo = undefined;
@@ -6152,11 +6136,16 @@ const IdDoubleSide = class {
6152
6136
  }
6153
6137
  async capturedIdRecording(event) {
6154
6138
  let idRecording = event.detail;
6139
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
6140
+ this.recordingResultCount++;
6141
+ return;
6142
+ }
6155
6143
  if (idRecording.size == 0) {
6156
6144
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
6157
6145
  this.triggerErrorFlow();
6158
6146
  return;
6159
6147
  }
6148
+ this.recordingResultCount = 0;
6160
6149
  let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
6161
6150
  try {
6162
6151
  this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
@@ -6264,6 +6253,7 @@ const IdSingleSide = class {
6264
6253
  constructor(hostRef) {
6265
6254
  index.registerInstance(this, hostRef);
6266
6255
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
6256
+ this.recordingResultCount = 0;
6267
6257
  this.showTimeout = undefined;
6268
6258
  this.showHowTo = undefined;
6269
6259
  this.idFlow = {
@@ -6310,6 +6300,10 @@ const IdSingleSide = class {
6310
6300
  }
6311
6301
  async capturedIdRecording(event) {
6312
6302
  let idRecording = event.detail;
6303
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
6304
+ this.recordingResultCount++;
6305
+ return;
6306
+ }
6313
6307
  if (idRecording.size == 0) {
6314
6308
  await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
6315
6309
  this.showTimeout = true;
@@ -6458,7 +6452,7 @@ function v4(options, buf, offset) {
6458
6452
  }
6459
6453
 
6460
6454
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6461
- const version$1 = "3.6.4";
6455
+ const version$1 = "3.6.6";
6462
6456
  const description = "Person Identification Component";
6463
6457
  const main = "./dist/index.cjs.js";
6464
6458
  const module$1 = "./dist/index.js";
@@ -10103,6 +10097,7 @@ const UserLiveness = class {
10103
10097
  constructor(hostRef) {
10104
10098
  index.registerInstance(this, hostRef);
10105
10099
  this.apiErrorEvent = index.createEvent(this, "apiError", 7);
10100
+ this.recordingResultCount = 0;
10106
10101
  this.showError = undefined;
10107
10102
  this.showHowTo = undefined;
10108
10103
  this.selfieFlow = {
@@ -10151,6 +10146,10 @@ const UserLiveness = class {
10151
10146
  }
10152
10147
  async capturedSelfieRecording(event) {
10153
10148
  let selfieRecording = event.detail;
10149
+ if (selfieRecording.size == 0 && this.recordingResultCount == 0) {
10150
+ this.recordingResultCount++;
10151
+ return;
10152
+ }
10154
10153
  if (selfieRecording.size == 0) {
10155
10154
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
10156
10155
  this.triggerErrorFlow();
@@ -62,7 +62,6 @@ export class IdCapture {
62
62
  }
63
63
  async openCamera() {
64
64
  await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
65
- //const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
66
65
  const constraints = this.cameras.GetConstraints(store.cameraId, store.device);
67
66
  setTimeout(() => {
68
67
  navigator.mediaDevices
@@ -58,8 +58,6 @@ export class Camera {
58
58
  return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
59
59
  }
60
60
  startStream() {
61
- if (!Stream.instance)
62
- Stream.getInstance(this.modelPath);
63
61
  const stream = Stream.getInstance();
64
62
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
65
63
  if (this.captureMode == 'selfie') {
@@ -8,6 +8,7 @@ import { BaseComponent } from '../../base-component';
8
8
  // import { IDPose } from '../../libs/IDML5Detector/IDPose';
9
9
  export class IdDoubleSide {
10
10
  constructor() {
11
+ this.recordingResultCount = 0;
11
12
  this.showTimeout = undefined;
12
13
  this.showInvalid = undefined;
13
14
  this.showHowTo = undefined;
@@ -90,11 +91,16 @@ export class IdDoubleSide {
90
91
  }
91
92
  async capturedIdRecording(event) {
92
93
  let idRecording = event.detail;
94
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
95
+ this.recordingResultCount++;
96
+ return;
97
+ }
93
98
  if (idRecording.size == 0) {
94
99
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
95
100
  this.triggerErrorFlow();
96
101
  return;
97
102
  }
103
+ this.recordingResultCount = 0;
98
104
  let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
99
105
  try {
100
106
  this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
@@ -8,6 +8,7 @@ import { BaseComponent } from '../../base-component';
8
8
  // import { IDPose } from '../../libs/IDML5Detector/IDPose';
9
9
  export class IdSingleSide {
10
10
  constructor() {
11
+ this.recordingResultCount = 0;
11
12
  this.showTimeout = undefined;
12
13
  this.showHowTo = undefined;
13
14
  this.idFlow = {
@@ -54,6 +55,10 @@ export class IdSingleSide {
54
55
  }
55
56
  async capturedIdRecording(event) {
56
57
  let idRecording = event.detail;
58
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
59
+ this.recordingResultCount++;
60
+ return;
61
+ }
57
62
  if (idRecording.size == 0) {
58
63
  await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
59
64
  this.showTimeout = true;
@@ -7,6 +7,7 @@ import { getLogMessage } from '../../../utils/utils';
7
7
  import { BaseComponent } from '../../base-component';
8
8
  export class UserLiveness {
9
9
  constructor() {
10
+ this.recordingResultCount = 0;
10
11
  this.showError = undefined;
11
12
  this.showHowTo = undefined;
12
13
  this.selfieFlow = {
@@ -55,6 +56,10 @@ export class UserLiveness {
55
56
  }
56
57
  async capturedSelfieRecording(event) {
57
58
  let selfieRecording = event.detail;
59
+ if (selfieRecording.size == 0 && this.recordingResultCount == 0) {
60
+ this.recordingResultCount++;
61
+ return;
62
+ }
58
63
  if (selfieRecording.size == 0) {
59
64
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
60
65
  this.triggerErrorFlow();
@@ -6,7 +6,6 @@ export class Cameras {
6
6
  const devices = await navigator.mediaDevices.enumerateDevices();
7
7
  const videoDevices = devices.filter(device => device.kind === 'videoinput');
8
8
  for (const device of videoDevices) {
9
- //const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
10
9
  const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
11
10
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
12
11
  stream.getVideoTracks().forEach(track => {
@@ -83,8 +82,14 @@ export class Cameras {
83
82
  else {
84
83
  mediaTrack.facingMode = 'user';
85
84
  if (portrait) {
86
- mediaTrack.width = { ideal: 1920 };
87
- mediaTrack.height = { ideal: 1080 };
85
+ if (device.isAndroidDevice) {
86
+ mediaTrack.width = { ideal: 1280 };
87
+ mediaTrack.height = { ideal: 720 };
88
+ }
89
+ else {
90
+ mediaTrack.width = { ideal: 1920 };
91
+ mediaTrack.height = { ideal: 1080 };
92
+ }
88
93
  }
89
94
  else {
90
95
  mediaTrack.facingMode = 'environment';
@@ -95,27 +100,6 @@ export class Cameras {
95
100
  constraints.video = mediaTrack;
96
101
  return constraints;
97
102
  }
98
- // public GetConstraintsIOs(device: DeviceState, portrait: boolean = false): MediaStreamConstraints | any {
99
- // let constraints: MediaStreamConstraints = {
100
- // audio: false,
101
- // };
102
- // let mediaTrack: MediaTrackConstraints = {};
103
- // if (device.isDesktop) {
104
- // mediaTrack.width = 1280;
105
- // } else {
106
- // if (portrait) {
107
- // mediaTrack.facingMode = 'user';
108
- // mediaTrack.width = 1280;
109
- // mediaTrack.height = 720;
110
- // } else {
111
- // mediaTrack.facingMode = 'environment';
112
- // mediaTrack.width = 1280;
113
- // mediaTrack.height = 720;
114
- // }
115
- // }
116
- // constraints.video = mediaTrack;
117
- // return constraints;
118
- // }
119
103
  GetRecommendedCamera(cameras) {
120
104
  if (cameras && cameras.length > 0) {
121
105
  var recommDevice = cameras.find(c => c.recommended);
@@ -46,7 +46,7 @@ export class Stream {
46
46
  setVerificationFinished(fun) {
47
47
  this.verificationFinished = fun;
48
48
  }
49
- constructor(_modelPath) {
49
+ constructor() {
50
50
  this.streamPaused = false;
51
51
  this.recordedChunks = [];
52
52
  this.videoSize = { width: 0, height: 0 };
@@ -60,9 +60,9 @@ export class Stream {
60
60
  this.idML5Detector = IDML5Detector.getInstance(this, store.device.isMobile);
61
61
  this.faceML5Detector = FaceML5Detector.getInstance(this, store.device.isMobile);
62
62
  }
63
- static getInstance(modelPath) {
63
+ static getInstance() {
64
64
  if (!Stream.instance) {
65
- Stream.instance = new Stream(modelPath);
65
+ Stream.instance = new Stream();
66
66
  }
67
67
  return Stream.instance;
68
68
  }
@@ -121,6 +121,8 @@ export class Stream {
121
121
  // if (this.faceDetection) await Detector.getInstance().startDetector();
122
122
  }
123
123
  recordStream() {
124
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
125
+ return;
124
126
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
125
127
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
126
128
  if (store.device.mobileOS == MobileOS.iOS || store.device.browser == Browser.Safari)
@@ -5232,7 +5232,7 @@ class Stream {
5232
5232
  setVerificationFinished(fun) {
5233
5233
  this.verificationFinished = fun;
5234
5234
  }
5235
- constructor(_modelPath) {
5235
+ constructor() {
5236
5236
  this.streamPaused = false;
5237
5237
  this.recordedChunks = [];
5238
5238
  this.videoSize = { width: 0, height: 0 };
@@ -5246,9 +5246,9 @@ class Stream {
5246
5246
  this.idML5Detector = IDML5Detector.getInstance(this, state.device.isMobile);
5247
5247
  this.faceML5Detector = FaceML5Detector.getInstance(this, state.device.isMobile);
5248
5248
  }
5249
- static getInstance(modelPath) {
5249
+ static getInstance() {
5250
5250
  if (!Stream.instance) {
5251
- Stream.instance = new Stream(modelPath);
5251
+ Stream.instance = new Stream();
5252
5252
  }
5253
5253
  return Stream.instance;
5254
5254
  }
@@ -5307,6 +5307,8 @@ class Stream {
5307
5307
  // if (this.faceDetection) await Detector.getInstance().startDetector();
5308
5308
  }
5309
5309
  recordStream() {
5310
+ if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
5311
+ return;
5310
5312
  var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
5311
5313
  if (!MediaRecorder.isTypeSupported(options.mimeType)) {
5312
5314
  if (state.device.mobileOS == MobileOS.iOS || state.device.browser == Browser.Safari)
@@ -5473,8 +5475,6 @@ const Camera = class {
5473
5475
  return (h("div", { class: "camera" }, h("video", { id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.cameraVideo = el) }), h("canvas", { id: "output", class: cameraCanvasClass, ref: el => (this.cameraCanvas = el) })));
5474
5476
  }
5475
5477
  startStream() {
5476
- if (!Stream.instance)
5477
- Stream.getInstance(this.modelPath);
5478
5478
  const stream = Stream.getInstance();
5479
5479
  stream.updateHtmlElements(this.cameraVideo, this.cameraCanvas, this.component);
5480
5480
  if (this.captureMode == 'selfie') {
@@ -5678,7 +5678,6 @@ class Cameras {
5678
5678
  const devices = await navigator.mediaDevices.enumerateDevices();
5679
5679
  const videoDevices = devices.filter(device => device.kind === 'videoinput');
5680
5680
  for (const device of videoDevices) {
5681
- //const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
5682
5681
  const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
5683
5682
  const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
5684
5683
  stream.getVideoTracks().forEach(track => {
@@ -5755,8 +5754,14 @@ class Cameras {
5755
5754
  else {
5756
5755
  mediaTrack.facingMode = 'user';
5757
5756
  if (portrait) {
5758
- mediaTrack.width = { ideal: 1920 };
5759
- mediaTrack.height = { ideal: 1080 };
5757
+ if (device.isAndroidDevice) {
5758
+ mediaTrack.width = { ideal: 1280 };
5759
+ mediaTrack.height = { ideal: 720 };
5760
+ }
5761
+ else {
5762
+ mediaTrack.width = { ideal: 1920 };
5763
+ mediaTrack.height = { ideal: 1080 };
5764
+ }
5760
5765
  }
5761
5766
  else {
5762
5767
  mediaTrack.facingMode = 'environment';
@@ -5767,27 +5772,6 @@ class Cameras {
5767
5772
  constraints.video = mediaTrack;
5768
5773
  return constraints;
5769
5774
  }
5770
- // public GetConstraintsIOs(device: DeviceState, portrait: boolean = false): MediaStreamConstraints | any {
5771
- // let constraints: MediaStreamConstraints = {
5772
- // audio: false,
5773
- // };
5774
- // let mediaTrack: MediaTrackConstraints = {};
5775
- // if (device.isDesktop) {
5776
- // mediaTrack.width = 1280;
5777
- // } else {
5778
- // if (portrait) {
5779
- // mediaTrack.facingMode = 'user';
5780
- // mediaTrack.width = 1280;
5781
- // mediaTrack.height = 720;
5782
- // } else {
5783
- // mediaTrack.facingMode = 'environment';
5784
- // mediaTrack.width = 1280;
5785
- // mediaTrack.height = 720;
5786
- // }
5787
- // }
5788
- // constraints.video = mediaTrack;
5789
- // return constraints;
5790
- // }
5791
5775
  GetRecommendedCamera(cameras) {
5792
5776
  if (cameras && cameras.length > 0) {
5793
5777
  var recommDevice = cameras.find(c => c.recommended);
@@ -5994,7 +5978,6 @@ const IdCapture = class {
5994
5978
  }
5995
5979
  async openCamera() {
5996
5980
  await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
5997
- //const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
5998
5981
  const constraints = this.cameras.GetConstraints(state.cameraId, state.device);
5999
5982
  setTimeout(() => {
6000
5983
  navigator.mediaDevices
@@ -6066,6 +6049,7 @@ const IdDoubleSide = class {
6066
6049
  constructor(hostRef) {
6067
6050
  registerInstance(this, hostRef);
6068
6051
  this.apiErrorEvent = createEvent(this, "apiError", 7);
6052
+ this.recordingResultCount = 0;
6069
6053
  this.showTimeout = undefined;
6070
6054
  this.showInvalid = undefined;
6071
6055
  this.showHowTo = undefined;
@@ -6148,11 +6132,16 @@ const IdDoubleSide = class {
6148
6132
  }
6149
6133
  async capturedIdRecording(event) {
6150
6134
  let idRecording = event.detail;
6135
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
6136
+ this.recordingResultCount++;
6137
+ return;
6138
+ }
6151
6139
  if (idRecording.size == 0) {
6152
6140
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
6153
6141
  this.triggerErrorFlow();
6154
6142
  return;
6155
6143
  }
6144
+ this.recordingResultCount = 0;
6156
6145
  let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
6157
6146
  try {
6158
6147
  this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
@@ -6260,6 +6249,7 @@ const IdSingleSide = class {
6260
6249
  constructor(hostRef) {
6261
6250
  registerInstance(this, hostRef);
6262
6251
  this.apiErrorEvent = createEvent(this, "apiError", 7);
6252
+ this.recordingResultCount = 0;
6263
6253
  this.showTimeout = undefined;
6264
6254
  this.showHowTo = undefined;
6265
6255
  this.idFlow = {
@@ -6306,6 +6296,10 @@ const IdSingleSide = class {
6306
6296
  }
6307
6297
  async capturedIdRecording(event) {
6308
6298
  let idRecording = event.detail;
6299
+ if (idRecording.size == 0 && this.recordingResultCount == 0) {
6300
+ this.recordingResultCount++;
6301
+ return;
6302
+ }
6309
6303
  if (idRecording.size == 0) {
6310
6304
  await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
6311
6305
  this.showTimeout = true;
@@ -6454,7 +6448,7 @@ function v4(options, buf, offset) {
6454
6448
  }
6455
6449
 
6456
6450
  const name = "@ekyc_qoobiss/qbs-ect-cmp";
6457
- const version$1 = "3.6.4";
6451
+ const version$1 = "3.6.6";
6458
6452
  const description = "Person Identification Component";
6459
6453
  const main = "./dist/index.cjs.js";
6460
6454
  const module = "./dist/index.js";
@@ -10099,6 +10093,7 @@ const UserLiveness = class {
10099
10093
  constructor(hostRef) {
10100
10094
  registerInstance(this, hostRef);
10101
10095
  this.apiErrorEvent = createEvent(this, "apiError", 7);
10096
+ this.recordingResultCount = 0;
10102
10097
  this.showError = undefined;
10103
10098
  this.showHowTo = undefined;
10104
10099
  this.selfieFlow = {
@@ -10147,6 +10142,10 @@ const UserLiveness = class {
10147
10142
  }
10148
10143
  async capturedSelfieRecording(event) {
10149
10144
  let selfieRecording = event.detail;
10145
+ if (selfieRecording.size == 0 && this.recordingResultCount == 0) {
10146
+ this.recordingResultCount++;
10147
+ return;
10148
+ }
10150
10149
  if (selfieRecording.size == 0) {
10151
10150
  await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording }, getLogMessage());
10152
10151
  this.triggerErrorFlow();