@ekyc_qoobiss/qbs-ect-cmp 3.6.39 → 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.
- package/dist/cjs/agreement-check_19.cjs.entry.js +3 -66
- package/dist/collection/components/controls/camera/camera.js +0 -59
- package/dist/collection/helpers/Stream.js +1 -47
- package/dist/esm/agreement-check_19.entry.js +3 -66
- package/dist/qbs-ect-cmp/{p-4e3b735b.entry.js → p-df2ea91b.entry.js} +1 -1
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/controls/camera/camera.d.ts +0 -7
- package/dist/types/components.d.ts +0 -3
- package/dist/types/helpers/Stream.d.ts +0 -11
- package/package.json +1 -1
|
@@ -4520,24 +4520,12 @@ class Stream {
|
|
|
4520
4520
|
this.idDetection = val;
|
|
4521
4521
|
this.faceDetection = !val;
|
|
4522
4522
|
}
|
|
4523
|
-
// public setProbabilityThreshold(val: number): void {
|
|
4524
|
-
// Detector.getInstance().setProbabilityThreshold(val);
|
|
4525
|
-
// }
|
|
4526
|
-
setCallbackChangeTitle(fun) {
|
|
4527
|
-
this.callbackChangeTitle = fun;
|
|
4528
|
-
}
|
|
4529
4523
|
setCallbackVideoStarted(fun) {
|
|
4530
4524
|
this.callbackVideoStarted = fun;
|
|
4531
4525
|
}
|
|
4532
|
-
setCallbackErrors(fun) {
|
|
4533
|
-
this.callbackErrors = fun;
|
|
4534
|
-
}
|
|
4535
4526
|
setCallbackAutoCapturing(fun) {
|
|
4536
4527
|
this.callbackAutoCapturing = fun;
|
|
4537
4528
|
}
|
|
4538
|
-
// public setCallbackFaceDetectionErrors(fun: (e: PipelineResult) => void): void {
|
|
4539
|
-
// this.callbackFaceDetectionErrors = fun;
|
|
4540
|
-
// }
|
|
4541
4529
|
setCallbackRecordingReady(fun) {
|
|
4542
4530
|
this.callbackRecordingReady = fun;
|
|
4543
4531
|
}
|
|
@@ -4551,13 +4539,6 @@ class Stream {
|
|
|
4551
4539
|
this.streamPaused = false;
|
|
4552
4540
|
this.recordedChunks = [];
|
|
4553
4541
|
this.videoSize = { width: 0, height: 0 };
|
|
4554
|
-
this.pauseStream = () => {
|
|
4555
|
-
this.streamPaused = true;
|
|
4556
|
-
this.mediaRecorder.pause();
|
|
4557
|
-
this.videoElement.pause();
|
|
4558
|
-
// this.dropMask();
|
|
4559
|
-
// if (this.faceDetection) Detector.getInstance().stopDetector();
|
|
4560
|
-
};
|
|
4561
4542
|
this.initFacePose();
|
|
4562
4543
|
this.idML5Detector = IDML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
|
|
4563
4544
|
this.faceML5Detector = FaceML5Detector.getInstance(this, TranslationUtils.state.device.isMobile);
|
|
@@ -4569,9 +4550,6 @@ class Stream {
|
|
|
4569
4550
|
}
|
|
4570
4551
|
return Stream.instance;
|
|
4571
4552
|
}
|
|
4572
|
-
// public returnErrors(errors: PipelineResult) {
|
|
4573
|
-
// this.callbackFaceDetectionErrors(errors);
|
|
4574
|
-
// }
|
|
4575
4553
|
autoCapturing() {
|
|
4576
4554
|
this.callbackAutoCapturing();
|
|
4577
4555
|
}
|
|
@@ -4587,7 +4565,6 @@ class Stream {
|
|
|
4587
4565
|
this.idML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
|
|
4588
4566
|
this.faceML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
|
|
4589
4567
|
}
|
|
4590
|
-
static orientationChange() { }
|
|
4591
4568
|
startStream(stream) {
|
|
4592
4569
|
if (this.stream)
|
|
4593
4570
|
this.stream.getTracks().forEach((track) => track.stop());
|
|
@@ -4619,13 +4596,6 @@ class Stream {
|
|
|
4619
4596
|
this.startStream(stream);
|
|
4620
4597
|
this.recordStream();
|
|
4621
4598
|
}
|
|
4622
|
-
async resumeStream() {
|
|
4623
|
-
this.streamPaused = false;
|
|
4624
|
-
this.mediaRecorder.resume();
|
|
4625
|
-
await this.videoElement.play();
|
|
4626
|
-
// this.drawMask();
|
|
4627
|
-
// if (this.faceDetection) await Detector.getInstance().startDetector();
|
|
4628
|
-
}
|
|
4629
4599
|
recordStream() {
|
|
4630
4600
|
if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
|
|
4631
4601
|
return;
|
|
@@ -4665,7 +4635,6 @@ class Stream {
|
|
|
4665
4635
|
if (this.mediaRecorder && this.mediaRecorder.state != 'inactive') {
|
|
4666
4636
|
this.mediaRecorder.stop();
|
|
4667
4637
|
}
|
|
4668
|
-
// if (this.faceDetection) Detector.getInstance().stopDetector();
|
|
4669
4638
|
}
|
|
4670
4639
|
streamStopped() {
|
|
4671
4640
|
return !(this.stream && this.stream.getTracks && this.stream.getTracks().length > 0);
|
|
@@ -4688,15 +4657,13 @@ class Stream {
|
|
|
4688
4657
|
}
|
|
4689
4658
|
catch (e) {
|
|
4690
4659
|
resolve(frame);
|
|
4691
|
-
this.
|
|
4660
|
+
this.timeElapsed();
|
|
4692
4661
|
}
|
|
4693
4662
|
}
|
|
4694
4663
|
else {
|
|
4695
4664
|
resolve(frame);
|
|
4696
4665
|
}
|
|
4697
4666
|
}, ImageFormat.PNG, 1);
|
|
4698
|
-
//let outCanvContext = this.canvasElement.getContext('2d');
|
|
4699
|
-
//outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
|
|
4700
4667
|
});
|
|
4701
4668
|
}
|
|
4702
4669
|
async startIdDetection() {
|
|
@@ -4712,22 +4679,9 @@ class Stream {
|
|
|
4712
4679
|
initFacePose() {
|
|
4713
4680
|
this.facePose = FacePosePick.randomEnum(FacePose);
|
|
4714
4681
|
}
|
|
4715
|
-
requestFacePose() {
|
|
4716
|
-
// var pose = FacePose.TiltLeft;
|
|
4717
|
-
this.callbackChangeTitle(this.facePose);
|
|
4718
|
-
return this.facePose;
|
|
4719
|
-
}
|
|
4720
|
-
changeFacePose() {
|
|
4721
|
-
this.callbackChangeTitle(null);
|
|
4722
|
-
}
|
|
4723
|
-
changeIDPose(pose) {
|
|
4724
|
-
this.callbackChangeTitle(pose);
|
|
4725
|
-
}
|
|
4726
4682
|
}
|
|
4727
4683
|
Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
|
|
4728
|
-
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
4729
|
-
window.addEventListener('resize', Stream.orientationChange, false);
|
|
4730
|
-
window.addEventListener('orientationchange', Stream.orientationChange, false);
|
|
4684
|
+
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
4731
4685
|
|
|
4732
4686
|
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}";
|
|
4733
4687
|
|
|
@@ -4735,23 +4689,11 @@ const Camera = class {
|
|
|
4735
4689
|
constructor(hostRef) {
|
|
4736
4690
|
index.registerInstance(this, hostRef);
|
|
4737
4691
|
this.eventVideoStarted = index.createEvent(this, "videoStarted", 7);
|
|
4738
|
-
this.eventCloseCamera = index.createEvent(this, "closeCamera", 7);
|
|
4739
|
-
this.errorCameraEvent = index.createEvent(this, "errorCamera", 7);
|
|
4740
4692
|
this.eventTakePhoto = index.createEvent(this, "takePhoto", 7);
|
|
4741
4693
|
this.eventRecordingSelfieReady = index.createEvent(this, "recordingSelfieCapture", 7);
|
|
4742
4694
|
this.eventRecordingIdReady = index.createEvent(this, "recordingIdCapture", 7);
|
|
4743
4695
|
this.eventTimeElapsed = index.createEvent(this, "timeElapsed", 7);
|
|
4744
|
-
this.eventChangeTitle = index.createEvent(this, "changeTitle", 7);
|
|
4745
4696
|
this.verificationFinished = index.createEvent(this, "verificationFinished", 7);
|
|
4746
|
-
this.callbackErrors = (error, isError) => {
|
|
4747
|
-
if (isError) {
|
|
4748
|
-
this.errorCameraEvent.emit(error);
|
|
4749
|
-
this.eventCloseCamera.emit();
|
|
4750
|
-
}
|
|
4751
|
-
else {
|
|
4752
|
-
this.errorCameraEvent.emit(error);
|
|
4753
|
-
}
|
|
4754
|
-
};
|
|
4755
4697
|
this.callbackAutoCapturing = () => {
|
|
4756
4698
|
this.eventTakePhoto.emit();
|
|
4757
4699
|
};
|
|
@@ -4767,9 +4709,6 @@ const Camera = class {
|
|
|
4767
4709
|
this.callbackTimeElapsed = () => {
|
|
4768
4710
|
this.eventTimeElapsed.emit();
|
|
4769
4711
|
};
|
|
4770
|
-
this.callbackChangeTitle = (message) => {
|
|
4771
|
-
this.eventChangeTitle.emit(message);
|
|
4772
|
-
};
|
|
4773
4712
|
this.callbackVideoStarted = () => {
|
|
4774
4713
|
this.eventVideoStarted.emit(this.component.getBoundingClientRect());
|
|
4775
4714
|
};
|
|
@@ -4812,9 +4751,7 @@ const Camera = class {
|
|
|
4812
4751
|
stream.setCallbackRecordingReady(this.callbackIdRecordingReady);
|
|
4813
4752
|
// stream.setShowMask(false);
|
|
4814
4753
|
}
|
|
4815
|
-
stream.setCallbackErrors(this.callbackErrors);
|
|
4816
4754
|
stream.setCallbackAutoCapturing(this.callbackAutoCapturing);
|
|
4817
|
-
stream.setCallbackChangeTitle(this.callbackChangeTitle);
|
|
4818
4755
|
stream.setCallbackVideoStarted(this.callbackVideoStarted);
|
|
4819
4756
|
stream.setCallbackTimeElapsed(this.callbackTimeElapsed);
|
|
4820
4757
|
stream.setVerificationFinished(this.callbackVerificationFinished);
|
|
@@ -5578,7 +5515,7 @@ function v4(options, buf, offset) {
|
|
|
5578
5515
|
}
|
|
5579
5516
|
|
|
5580
5517
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
5581
|
-
const version$1 = "3.6.
|
|
5518
|
+
const version$1 = "3.6.40";
|
|
5582
5519
|
const description = "Person Identification Component";
|
|
5583
5520
|
const main = "./dist/index.cjs.js";
|
|
5584
5521
|
const module$1 = "./dist/index.js";
|
|
@@ -5,15 +5,6 @@ import { VerificationMode } from '../../../models/IVerificationMode';
|
|
|
5
5
|
// import { PipelineResult } from '../../../libs/FaceDetector/PipelineResult';
|
|
6
6
|
export class Camera {
|
|
7
7
|
constructor() {
|
|
8
|
-
this.callbackErrors = (error, isError) => {
|
|
9
|
-
if (isError) {
|
|
10
|
-
this.errorCameraEvent.emit(error);
|
|
11
|
-
this.eventCloseCamera.emit();
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
this.errorCameraEvent.emit(error);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
8
|
this.callbackAutoCapturing = () => {
|
|
18
9
|
this.eventTakePhoto.emit();
|
|
19
10
|
};
|
|
@@ -29,9 +20,6 @@ export class Camera {
|
|
|
29
20
|
this.callbackTimeElapsed = () => {
|
|
30
21
|
this.eventTimeElapsed.emit();
|
|
31
22
|
};
|
|
32
|
-
this.callbackChangeTitle = (message) => {
|
|
33
|
-
this.eventChangeTitle.emit(message);
|
|
34
|
-
};
|
|
35
23
|
this.callbackVideoStarted = () => {
|
|
36
24
|
this.eventVideoStarted.emit(this.component.getBoundingClientRect());
|
|
37
25
|
};
|
|
@@ -74,9 +62,7 @@ export class Camera {
|
|
|
74
62
|
stream.setCallbackRecordingReady(this.callbackIdRecordingReady);
|
|
75
63
|
// stream.setShowMask(false);
|
|
76
64
|
}
|
|
77
|
-
stream.setCallbackErrors(this.callbackErrors);
|
|
78
65
|
stream.setCallbackAutoCapturing(this.callbackAutoCapturing);
|
|
79
|
-
stream.setCallbackChangeTitle(this.callbackChangeTitle);
|
|
80
66
|
stream.setCallbackVideoStarted(this.callbackVideoStarted);
|
|
81
67
|
stream.setCallbackTimeElapsed(this.callbackTimeElapsed);
|
|
82
68
|
stream.setVerificationFinished(this.callbackVerificationFinished);
|
|
@@ -163,36 +149,6 @@ export class Camera {
|
|
|
163
149
|
"resolved": "any",
|
|
164
150
|
"references": {}
|
|
165
151
|
}
|
|
166
|
-
}, {
|
|
167
|
-
"method": "eventCloseCamera",
|
|
168
|
-
"name": "closeCamera",
|
|
169
|
-
"bubbles": true,
|
|
170
|
-
"cancelable": true,
|
|
171
|
-
"composed": true,
|
|
172
|
-
"docs": {
|
|
173
|
-
"tags": [],
|
|
174
|
-
"text": ""
|
|
175
|
-
},
|
|
176
|
-
"complexType": {
|
|
177
|
-
"original": "any",
|
|
178
|
-
"resolved": "any",
|
|
179
|
-
"references": {}
|
|
180
|
-
}
|
|
181
|
-
}, {
|
|
182
|
-
"method": "errorCameraEvent",
|
|
183
|
-
"name": "errorCamera",
|
|
184
|
-
"bubbles": true,
|
|
185
|
-
"cancelable": true,
|
|
186
|
-
"composed": true,
|
|
187
|
-
"docs": {
|
|
188
|
-
"tags": [],
|
|
189
|
-
"text": ""
|
|
190
|
-
},
|
|
191
|
-
"complexType": {
|
|
192
|
-
"original": "any",
|
|
193
|
-
"resolved": "any",
|
|
194
|
-
"references": {}
|
|
195
|
-
}
|
|
196
152
|
}, {
|
|
197
153
|
"method": "eventTakePhoto",
|
|
198
154
|
"name": "takePhoto",
|
|
@@ -253,21 +209,6 @@ export class Camera {
|
|
|
253
209
|
"resolved": "any",
|
|
254
210
|
"references": {}
|
|
255
211
|
}
|
|
256
|
-
}, {
|
|
257
|
-
"method": "eventChangeTitle",
|
|
258
|
-
"name": "changeTitle",
|
|
259
|
-
"bubbles": true,
|
|
260
|
-
"cancelable": true,
|
|
261
|
-
"composed": true,
|
|
262
|
-
"docs": {
|
|
263
|
-
"tags": [],
|
|
264
|
-
"text": ""
|
|
265
|
-
},
|
|
266
|
-
"complexType": {
|
|
267
|
-
"original": "any",
|
|
268
|
-
"resolved": "any",
|
|
269
|
-
"references": {}
|
|
270
|
-
}
|
|
271
212
|
}, {
|
|
272
213
|
"method": "verificationFinished",
|
|
273
214
|
"name": "verificationFinished",
|
|
@@ -19,24 +19,12 @@ export class Stream {
|
|
|
19
19
|
this.idDetection = val;
|
|
20
20
|
this.faceDetection = !val;
|
|
21
21
|
}
|
|
22
|
-
// public setProbabilityThreshold(val: number): void {
|
|
23
|
-
// Detector.getInstance().setProbabilityThreshold(val);
|
|
24
|
-
// }
|
|
25
|
-
setCallbackChangeTitle(fun) {
|
|
26
|
-
this.callbackChangeTitle = fun;
|
|
27
|
-
}
|
|
28
22
|
setCallbackVideoStarted(fun) {
|
|
29
23
|
this.callbackVideoStarted = fun;
|
|
30
24
|
}
|
|
31
|
-
setCallbackErrors(fun) {
|
|
32
|
-
this.callbackErrors = fun;
|
|
33
|
-
}
|
|
34
25
|
setCallbackAutoCapturing(fun) {
|
|
35
26
|
this.callbackAutoCapturing = fun;
|
|
36
27
|
}
|
|
37
|
-
// public setCallbackFaceDetectionErrors(fun: (e: PipelineResult) => void): void {
|
|
38
|
-
// this.callbackFaceDetectionErrors = fun;
|
|
39
|
-
// }
|
|
40
28
|
setCallbackRecordingReady(fun) {
|
|
41
29
|
this.callbackRecordingReady = fun;
|
|
42
30
|
}
|
|
@@ -50,13 +38,6 @@ export class Stream {
|
|
|
50
38
|
this.streamPaused = false;
|
|
51
39
|
this.recordedChunks = [];
|
|
52
40
|
this.videoSize = { width: 0, height: 0 };
|
|
53
|
-
this.pauseStream = () => {
|
|
54
|
-
this.streamPaused = true;
|
|
55
|
-
this.mediaRecorder.pause();
|
|
56
|
-
this.videoElement.pause();
|
|
57
|
-
// this.dropMask();
|
|
58
|
-
// if (this.faceDetection) Detector.getInstance().stopDetector();
|
|
59
|
-
};
|
|
60
41
|
this.initFacePose();
|
|
61
42
|
this.idML5Detector = IDML5Detector.getInstance(this, store.device.isMobile);
|
|
62
43
|
this.faceML5Detector = FaceML5Detector.getInstance(this, store.device.isMobile);
|
|
@@ -68,9 +49,6 @@ export class Stream {
|
|
|
68
49
|
}
|
|
69
50
|
return Stream.instance;
|
|
70
51
|
}
|
|
71
|
-
// public returnErrors(errors: PipelineResult) {
|
|
72
|
-
// this.callbackFaceDetectionErrors(errors);
|
|
73
|
-
// }
|
|
74
52
|
autoCapturing() {
|
|
75
53
|
this.callbackAutoCapturing();
|
|
76
54
|
}
|
|
@@ -86,7 +64,6 @@ export class Stream {
|
|
|
86
64
|
this.idML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
|
|
87
65
|
this.faceML5Detector.updateHtmlElements(this.videoElement, this.canvasElement, component);
|
|
88
66
|
}
|
|
89
|
-
static orientationChange() { }
|
|
90
67
|
startStream(stream) {
|
|
91
68
|
if (this.stream)
|
|
92
69
|
this.stream.getTracks().forEach((track) => track.stop());
|
|
@@ -118,13 +95,6 @@ export class Stream {
|
|
|
118
95
|
this.startStream(stream);
|
|
119
96
|
this.recordStream();
|
|
120
97
|
}
|
|
121
|
-
async resumeStream() {
|
|
122
|
-
this.streamPaused = false;
|
|
123
|
-
this.mediaRecorder.resume();
|
|
124
|
-
await this.videoElement.play();
|
|
125
|
-
// this.drawMask();
|
|
126
|
-
// if (this.faceDetection) await Detector.getInstance().startDetector();
|
|
127
|
-
}
|
|
128
98
|
recordStream() {
|
|
129
99
|
if (this.mediaRecorder && this.mediaRecorder.state == 'recording')
|
|
130
100
|
return;
|
|
@@ -164,7 +134,6 @@ export class Stream {
|
|
|
164
134
|
if (this.mediaRecorder && this.mediaRecorder.state != 'inactive') {
|
|
165
135
|
this.mediaRecorder.stop();
|
|
166
136
|
}
|
|
167
|
-
// if (this.faceDetection) Detector.getInstance().stopDetector();
|
|
168
137
|
}
|
|
169
138
|
streamStopped() {
|
|
170
139
|
return !(this.stream && this.stream.getTracks && this.stream.getTracks().length > 0);
|
|
@@ -187,15 +156,13 @@ export class Stream {
|
|
|
187
156
|
}
|
|
188
157
|
catch (e) {
|
|
189
158
|
resolve(frame);
|
|
190
|
-
this.
|
|
159
|
+
this.timeElapsed();
|
|
191
160
|
}
|
|
192
161
|
}
|
|
193
162
|
else {
|
|
194
163
|
resolve(frame);
|
|
195
164
|
}
|
|
196
165
|
}, ImageFormat.PNG, 1);
|
|
197
|
-
//let outCanvContext = this.canvasElement.getContext('2d');
|
|
198
|
-
//outCanvContext.drawImage(this.videoElement, 0, 0, this.canvasElement.width, this.canvasElement.height);
|
|
199
166
|
});
|
|
200
167
|
}
|
|
201
168
|
async startIdDetection() {
|
|
@@ -211,19 +178,6 @@ export class Stream {
|
|
|
211
178
|
initFacePose() {
|
|
212
179
|
this.facePose = FacePosePick.randomEnum(FacePose);
|
|
213
180
|
}
|
|
214
|
-
requestFacePose() {
|
|
215
|
-
// var pose = FacePose.TiltLeft;
|
|
216
|
-
this.callbackChangeTitle(this.facePose);
|
|
217
|
-
return this.facePose;
|
|
218
|
-
}
|
|
219
|
-
changeFacePose() {
|
|
220
|
-
this.callbackChangeTitle(null);
|
|
221
|
-
}
|
|
222
|
-
changeIDPose(pose) {
|
|
223
|
-
this.callbackChangeTitle(pose);
|
|
224
|
-
}
|
|
225
181
|
}
|
|
226
182
|
Stream.mp4MimeType = { type: 'video/mp4', codec: 'codecs:h264', extension: 'mp4', mime: 'video/mp4;codecs:h264' };
|
|
227
183
|
Stream.webmMimeType = { type: 'video/webm', codec: 'codecs=vp8', extension: 'webm', mime: 'video/webm;codecs=vp8' };
|
|
228
|
-
window.addEventListener('resize', Stream.orientationChange, false);
|
|
229
|
-
window.addEventListener('orientationchange', Stream.orientationChange, false);
|
|
@@ -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.
|
|
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.
|
|
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";
|