@ekyc_qoobiss/qbs-ect-cmp 1.10.17 → 1.10.19
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.
- package/dist/cjs/agreement-check_17.cjs.entry.js +28 -17
- package/dist/collection/components/flow/id-double-side/id-double-side.js +7 -3
- package/dist/collection/components/flow/id-single-side/id-single-side.js +7 -3
- package/dist/collection/components/flow/user-liveness/user-liveness.js +7 -3
- package/dist/collection/helpers/Stream.js +5 -3
- package/dist/collection/libs/FaceML5Detector/FaceML5Detector.js +5 -5
- package/dist/esm/agreement-check_17.entry.js +28 -17
- package/dist/qbs-ect-cmp/{p-23ff40f8.entry.js → p-583c3004.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/helpers/Stream.d.ts +12 -0
- package/package.json +1 -1
|
@@ -2075,13 +2075,13 @@ class FaceML5Detector {
|
|
|
2075
2075
|
this.validFacePose = false;
|
|
2076
2076
|
this.validFaceFoundAgain = false;
|
|
2077
2077
|
this.MAX_NUMBER_FACES = 1;
|
|
2078
|
-
this.MIN_FACE_SCORE = 0.
|
|
2078
|
+
this.MIN_FACE_SCORE = 0.65;
|
|
2079
2079
|
// private readonly MIN_FACE_SIZE_FOR_MOBILE = 200;
|
|
2080
2080
|
// private readonly MIN_FACE_SIZE_FOR_DESKTOP = 350;
|
|
2081
|
-
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP =
|
|
2082
|
-
this.MIN_OCCUPIED_SPACE_FOR_MOBILE =
|
|
2083
|
-
this.X_OFFSET_FROM_FRAME =
|
|
2084
|
-
this.Y_OFFSET_FROM_FRAME =
|
|
2081
|
+
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP = 15;
|
|
2082
|
+
this.MIN_OCCUPIED_SPACE_FOR_MOBILE = 20;
|
|
2083
|
+
this.X_OFFSET_FROM_FRAME = 1;
|
|
2084
|
+
this.Y_OFFSET_FROM_FRAME = 1;
|
|
2085
2085
|
this.stream = stream;
|
|
2086
2086
|
this.ml5 = ML5.getInstance();
|
|
2087
2087
|
this.isMobile = isMobile;
|
|
@@ -4868,17 +4868,17 @@ class Stream {
|
|
|
4868
4868
|
// if (this.faceDetection) await Detector.getInstance().startDetector();
|
|
4869
4869
|
}
|
|
4870
4870
|
recordStream() {
|
|
4871
|
-
var options = { mimeType:
|
|
4871
|
+
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
4872
4872
|
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
|
|
4873
4873
|
if (this.device.isIos || this.device.isSafari)
|
|
4874
|
-
options.mimeType =
|
|
4874
|
+
options.mimeType = Stream.mp4MimeType.mime;
|
|
4875
4875
|
}
|
|
4876
4876
|
this.recordedChunks = [];
|
|
4877
4877
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
4878
4878
|
this.mediaRecorder.ondataavailable = event => {
|
|
4879
4879
|
this.recordedChunks.push(event.data);
|
|
4880
4880
|
};
|
|
4881
|
-
this.mediaRecorder.onstop =
|
|
4881
|
+
this.mediaRecorder.onstop = _e => {
|
|
4882
4882
|
this.saveVideoRecording(this.recordedChunks, options.mimeType);
|
|
4883
4883
|
this.recordedChunks = [];
|
|
4884
4884
|
};
|
|
@@ -4965,6 +4965,8 @@ class Stream {
|
|
|
4965
4965
|
this.callbackChangeTitle(pose);
|
|
4966
4966
|
}
|
|
4967
4967
|
}
|
|
4968
|
+
Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
|
|
4969
|
+
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
4968
4970
|
window.addEventListener('resize', Stream.orientationChange, false);
|
|
4969
4971
|
window.addEventListener('orientationchange', Stream.orientationChange, false);
|
|
4970
4972
|
|
|
@@ -5619,10 +5621,13 @@ const IdDoubleSide = class {
|
|
|
5619
5621
|
}
|
|
5620
5622
|
async capturedIdRecording(event) {
|
|
5621
5623
|
let idRecording = event.detail;
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5625
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5626
|
+
return;
|
|
5627
|
+
}
|
|
5628
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5624
5629
|
try {
|
|
5625
|
-
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + extension, { type: mimeType });
|
|
5630
|
+
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
5626
5631
|
this.uploadRecording();
|
|
5627
5632
|
}
|
|
5628
5633
|
catch (e) {
|
|
@@ -5752,11 +5757,14 @@ const IdSingleSide = class {
|
|
|
5752
5757
|
}
|
|
5753
5758
|
async capturedIdRecording(event) {
|
|
5754
5759
|
let idRecording = event.detail;
|
|
5755
|
-
|
|
5756
|
-
|
|
5760
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5761
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5762
|
+
return;
|
|
5763
|
+
}
|
|
5764
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5757
5765
|
if (state.flowStatus == FlowStatus.ID) {
|
|
5758
5766
|
try {
|
|
5759
|
-
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
|
|
5767
|
+
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
|
|
5760
5768
|
await this.uploadRecording();
|
|
5761
5769
|
}
|
|
5762
5770
|
catch (e) {
|
|
@@ -9271,10 +9279,13 @@ const UserLiveness = class {
|
|
|
9271
9279
|
}
|
|
9272
9280
|
async capturedSelfieRecording(event) {
|
|
9273
9281
|
let selfieRecording = event.detail;
|
|
9274
|
-
|
|
9275
|
-
|
|
9282
|
+
if (selfieRecording.length == 0 || selfieRecording.size == 0) {
|
|
9283
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording });
|
|
9284
|
+
return;
|
|
9285
|
+
}
|
|
9286
|
+
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9276
9287
|
try {
|
|
9277
|
-
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + extension, { type: mimeType });
|
|
9288
|
+
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + mimeType.extension, { type: mimeType.type });
|
|
9278
9289
|
await this.uploadRecording();
|
|
9279
9290
|
}
|
|
9280
9291
|
catch (e) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h /*getAssetPath*/ } from '@stencil/core';
|
|
2
2
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
3
3
|
import store from '../../../helpers/store';
|
|
4
|
+
import { Stream } from '../../../helpers/Stream';
|
|
4
5
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
6
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
6
7
|
export class IdDoubleSide {
|
|
@@ -73,10 +74,13 @@ export class IdDoubleSide {
|
|
|
73
74
|
}
|
|
74
75
|
async capturedIdRecording(event) {
|
|
75
76
|
let idRecording = event.detail;
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
78
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
78
82
|
try {
|
|
79
|
-
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + extension, { type: mimeType });
|
|
83
|
+
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
80
84
|
this.uploadRecording();
|
|
81
85
|
}
|
|
82
86
|
catch (e) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h /*getAssetPath*/ } from '@stencil/core';
|
|
2
2
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
3
3
|
import store from '../../../helpers/store';
|
|
4
|
+
import { Stream } from '../../../helpers/Stream';
|
|
4
5
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
6
|
// import { IDPose } from '../../libs/IDML5Detector/IDPose';
|
|
6
7
|
export class IdSingleSide {
|
|
@@ -44,11 +45,14 @@ export class IdSingleSide {
|
|
|
44
45
|
}
|
|
45
46
|
async capturedIdRecording(event) {
|
|
46
47
|
let idRecording = event.detail;
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
49
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
49
53
|
if (store.flowStatus == FlowStatus.ID) {
|
|
50
54
|
try {
|
|
51
|
-
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
|
|
55
|
+
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
|
|
52
56
|
await this.uploadRecording();
|
|
53
57
|
}
|
|
54
58
|
catch (e) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
3
3
|
import store from '../../../helpers/store';
|
|
4
|
+
import { Stream } from '../../../helpers/Stream';
|
|
4
5
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
5
6
|
export class UserLiveness {
|
|
6
7
|
constructor() {
|
|
@@ -40,10 +41,13 @@ export class UserLiveness {
|
|
|
40
41
|
}
|
|
41
42
|
async capturedSelfieRecording(event) {
|
|
42
43
|
let selfieRecording = event.detail;
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
if (selfieRecording.length == 0 || selfieRecording.size == 0) {
|
|
45
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording });
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
45
49
|
try {
|
|
46
|
-
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + extension, { type: mimeType });
|
|
50
|
+
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + mimeType.extension, { type: mimeType.type });
|
|
47
51
|
await this.uploadRecording();
|
|
48
52
|
}
|
|
49
53
|
catch (e) {
|
|
@@ -120,17 +120,17 @@ export class Stream {
|
|
|
120
120
|
// if (this.faceDetection) await Detector.getInstance().startDetector();
|
|
121
121
|
}
|
|
122
122
|
recordStream() {
|
|
123
|
-
var options = { mimeType:
|
|
123
|
+
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
124
124
|
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
|
|
125
125
|
if (this.device.isIos || this.device.isSafari)
|
|
126
|
-
options.mimeType =
|
|
126
|
+
options.mimeType = Stream.mp4MimeType.mime;
|
|
127
127
|
}
|
|
128
128
|
this.recordedChunks = [];
|
|
129
129
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
130
130
|
this.mediaRecorder.ondataavailable = event => {
|
|
131
131
|
this.recordedChunks.push(event.data);
|
|
132
132
|
};
|
|
133
|
-
this.mediaRecorder.onstop =
|
|
133
|
+
this.mediaRecorder.onstop = _e => {
|
|
134
134
|
this.saveVideoRecording(this.recordedChunks, options.mimeType);
|
|
135
135
|
this.recordedChunks = [];
|
|
136
136
|
};
|
|
@@ -217,5 +217,7 @@ export class Stream {
|
|
|
217
217
|
this.callbackChangeTitle(pose);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
+
Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
|
|
221
|
+
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
220
222
|
window.addEventListener('resize', Stream.orientationChange, false);
|
|
221
223
|
window.addEventListener('orientationchange', Stream.orientationChange, false);
|
|
@@ -25,13 +25,13 @@ export class FaceML5Detector {
|
|
|
25
25
|
this.validFacePose = false;
|
|
26
26
|
this.validFaceFoundAgain = false;
|
|
27
27
|
this.MAX_NUMBER_FACES = 1;
|
|
28
|
-
this.MIN_FACE_SCORE = 0.
|
|
28
|
+
this.MIN_FACE_SCORE = 0.65;
|
|
29
29
|
// private readonly MIN_FACE_SIZE_FOR_MOBILE = 200;
|
|
30
30
|
// private readonly MIN_FACE_SIZE_FOR_DESKTOP = 350;
|
|
31
|
-
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP =
|
|
32
|
-
this.MIN_OCCUPIED_SPACE_FOR_MOBILE =
|
|
33
|
-
this.X_OFFSET_FROM_FRAME =
|
|
34
|
-
this.Y_OFFSET_FROM_FRAME =
|
|
31
|
+
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP = 15;
|
|
32
|
+
this.MIN_OCCUPIED_SPACE_FOR_MOBILE = 20;
|
|
33
|
+
this.X_OFFSET_FROM_FRAME = 1;
|
|
34
|
+
this.Y_OFFSET_FROM_FRAME = 1;
|
|
35
35
|
this.stream = stream;
|
|
36
36
|
this.ml5 = ML5.getInstance();
|
|
37
37
|
this.isMobile = isMobile;
|
|
@@ -2071,13 +2071,13 @@ class FaceML5Detector {
|
|
|
2071
2071
|
this.validFacePose = false;
|
|
2072
2072
|
this.validFaceFoundAgain = false;
|
|
2073
2073
|
this.MAX_NUMBER_FACES = 1;
|
|
2074
|
-
this.MIN_FACE_SCORE = 0.
|
|
2074
|
+
this.MIN_FACE_SCORE = 0.65;
|
|
2075
2075
|
// private readonly MIN_FACE_SIZE_FOR_MOBILE = 200;
|
|
2076
2076
|
// private readonly MIN_FACE_SIZE_FOR_DESKTOP = 350;
|
|
2077
|
-
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP =
|
|
2078
|
-
this.MIN_OCCUPIED_SPACE_FOR_MOBILE =
|
|
2079
|
-
this.X_OFFSET_FROM_FRAME =
|
|
2080
|
-
this.Y_OFFSET_FROM_FRAME =
|
|
2077
|
+
this.MIN_OCCUPIED_SPACE_FOR_DESKTOP = 15;
|
|
2078
|
+
this.MIN_OCCUPIED_SPACE_FOR_MOBILE = 20;
|
|
2079
|
+
this.X_OFFSET_FROM_FRAME = 1;
|
|
2080
|
+
this.Y_OFFSET_FROM_FRAME = 1;
|
|
2081
2081
|
this.stream = stream;
|
|
2082
2082
|
this.ml5 = ML5.getInstance();
|
|
2083
2083
|
this.isMobile = isMobile;
|
|
@@ -4864,17 +4864,17 @@ class Stream {
|
|
|
4864
4864
|
// if (this.faceDetection) await Detector.getInstance().startDetector();
|
|
4865
4865
|
}
|
|
4866
4866
|
recordStream() {
|
|
4867
|
-
var options = { mimeType:
|
|
4867
|
+
var options = { mimeType: Stream.webmMimeType.mime, videoBitsPerSecond: 1500000 };
|
|
4868
4868
|
if (!MediaRecorder.isTypeSupported(options.mimeType)) {
|
|
4869
4869
|
if (this.device.isIos || this.device.isSafari)
|
|
4870
|
-
options.mimeType =
|
|
4870
|
+
options.mimeType = Stream.mp4MimeType.mime;
|
|
4871
4871
|
}
|
|
4872
4872
|
this.recordedChunks = [];
|
|
4873
4873
|
this.mediaRecorder = new MediaRecorder(this.stream, options);
|
|
4874
4874
|
this.mediaRecorder.ondataavailable = event => {
|
|
4875
4875
|
this.recordedChunks.push(event.data);
|
|
4876
4876
|
};
|
|
4877
|
-
this.mediaRecorder.onstop =
|
|
4877
|
+
this.mediaRecorder.onstop = _e => {
|
|
4878
4878
|
this.saveVideoRecording(this.recordedChunks, options.mimeType);
|
|
4879
4879
|
this.recordedChunks = [];
|
|
4880
4880
|
};
|
|
@@ -4961,6 +4961,8 @@ class Stream {
|
|
|
4961
4961
|
this.callbackChangeTitle(pose);
|
|
4962
4962
|
}
|
|
4963
4963
|
}
|
|
4964
|
+
Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
|
|
4965
|
+
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
4964
4966
|
window.addEventListener('resize', Stream.orientationChange, false);
|
|
4965
4967
|
window.addEventListener('orientationchange', Stream.orientationChange, false);
|
|
4966
4968
|
|
|
@@ -5615,10 +5617,13 @@ const IdDoubleSide = class {
|
|
|
5615
5617
|
}
|
|
5616
5618
|
async capturedIdRecording(event) {
|
|
5617
5619
|
let idRecording = event.detail;
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5621
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5622
|
+
return;
|
|
5623
|
+
}
|
|
5624
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5620
5625
|
try {
|
|
5621
|
-
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + extension, { type: mimeType });
|
|
5626
|
+
this.flow.recordingFile = new File([idRecording], this.flow.recordingFileName + mimeType.extension, { type: mimeType.type });
|
|
5622
5627
|
this.uploadRecording();
|
|
5623
5628
|
}
|
|
5624
5629
|
catch (e) {
|
|
@@ -5748,11 +5753,14 @@ const IdSingleSide = class {
|
|
|
5748
5753
|
}
|
|
5749
5754
|
async capturedIdRecording(event) {
|
|
5750
5755
|
let idRecording = event.detail;
|
|
5751
|
-
|
|
5752
|
-
|
|
5756
|
+
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
5757
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording });
|
|
5758
|
+
return;
|
|
5759
|
+
}
|
|
5760
|
+
let mimeType = idRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
5753
5761
|
if (state.flowStatus == FlowStatus.ID) {
|
|
5754
5762
|
try {
|
|
5755
|
-
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + extension, { type: mimeType });
|
|
5763
|
+
this.idFlow.recordingFile = new File([idRecording], 'idVideo.' + mimeType.extension, { type: mimeType.type });
|
|
5756
5764
|
await this.uploadRecording();
|
|
5757
5765
|
}
|
|
5758
5766
|
catch (e) {
|
|
@@ -9267,10 +9275,13 @@ const UserLiveness = class {
|
|
|
9267
9275
|
}
|
|
9268
9276
|
async capturedSelfieRecording(event) {
|
|
9269
9277
|
let selfieRecording = event.detail;
|
|
9270
|
-
|
|
9271
|
-
|
|
9278
|
+
if (selfieRecording.length == 0 || selfieRecording.size == 0) {
|
|
9279
|
+
await this.apiCall.AddLog({ message: 'Empty recording', blobData: selfieRecording });
|
|
9280
|
+
return;
|
|
9281
|
+
}
|
|
9282
|
+
let mimeType = selfieRecording.type == Stream.mp4MimeType.type ? Stream.mp4MimeType : Stream.webmMimeType;
|
|
9272
9283
|
try {
|
|
9273
|
-
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + extension, { type: mimeType });
|
|
9284
|
+
this.selfieFlow.recordingFile = new File([selfieRecording], 'selfieVideo.' + mimeType.extension, { type: mimeType.type });
|
|
9274
9285
|
await this.uploadRecording();
|
|
9275
9286
|
}
|
|
9276
9287
|
catch (e) {
|