@ekyc_qoobiss/qbs-ect-cmp 3.6.0 → 3.6.2
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_18.cjs.entry.js +49 -19
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/components/common/capture-error/capture-error.js +19 -1
- package/dist/collection/components/common/id-back-capture/id-back-capture.js +1 -1
- package/dist/collection/components/common/id-capture/id-capture.js +1 -1
- package/dist/collection/components/common/selfie-capture/selfie-capture.js +1 -1
- package/dist/collection/components/flow/id-single-side/id-single-side.js +8 -2
- package/dist/collection/helpers/Cameras.js +35 -12
- package/dist/esm/agreement-check_18.entry.js +49 -19
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/qbs-ect-cmp/{p-ed55aa4d.entry.js → p-32177442.entry.js} +24 -24
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/common/capture-error/capture-error.d.ts +1 -0
- package/dist/types/components/flow/id-single-side/id-single-side.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/helpers/Cameras.d.ts +2 -2
- package/package.json +1 -1
- package/dist/collection/models/IConstraints.js +0 -1
- package/dist/types/models/IConstraints.d.ts +0 -21
|
@@ -5568,6 +5568,7 @@ const CaptureError = class {
|
|
|
5568
5568
|
index.registerInstance(this, hostRef);
|
|
5569
5569
|
this.eventCaptureErrorDone = index.createEvent(this, "captureErrorDone", 7);
|
|
5570
5570
|
this.type = undefined;
|
|
5571
|
+
this.message = undefined;
|
|
5571
5572
|
this.buttonEnabled = undefined;
|
|
5572
5573
|
this.buttonText = undefined;
|
|
5573
5574
|
}
|
|
@@ -5599,7 +5600,7 @@ const CaptureError = class {
|
|
|
5599
5600
|
this.eventCaptureErrorDone.emit();
|
|
5600
5601
|
}
|
|
5601
5602
|
render() {
|
|
5602
|
-
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
5603
|
+
return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("h1", { class: "color-red" }, this.titleR1), index.h("h1", { class: "color-red" }, this.titleR2), index.h("div", null, index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), index.h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), index.h("p", { class: "color-red font-weight-bold font-size-18 mt-5" }, this.message)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
5603
5604
|
}
|
|
5604
5605
|
};
|
|
5605
5606
|
CaptureError.style = captureErrorCss;
|
|
@@ -5686,7 +5687,7 @@ class Cameras {
|
|
|
5686
5687
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
5687
5688
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
5688
5689
|
for (const device of videoDevices) {
|
|
5689
|
-
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
5690
|
+
const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
5690
5691
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
5691
5692
|
stream.getVideoTracks().forEach(track => {
|
|
5692
5693
|
var _a, _b;
|
|
@@ -5747,30 +5748,53 @@ class Cameras {
|
|
|
5747
5748
|
GetConstraints(selectedDeviceId, device, portrait = false) {
|
|
5748
5749
|
let constraints = {
|
|
5749
5750
|
audio: false,
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5751
|
+
};
|
|
5752
|
+
let mediaTrack = {
|
|
5753
|
+
frameRate: 30,
|
|
5753
5754
|
};
|
|
5754
5755
|
if (selectedDeviceId) {
|
|
5755
|
-
|
|
5756
|
+
mediaTrack.deviceId = {
|
|
5756
5757
|
exact: selectedDeviceId,
|
|
5757
5758
|
};
|
|
5758
5759
|
}
|
|
5759
5760
|
if (device.isDesktop) {
|
|
5760
|
-
|
|
5761
|
+
mediaTrack.width = { ideal: 1280 };
|
|
5762
|
+
}
|
|
5763
|
+
else {
|
|
5764
|
+
mediaTrack.facingMode = 'user';
|
|
5765
|
+
if (portrait) {
|
|
5766
|
+
mediaTrack.width = { ideal: 1920 };
|
|
5767
|
+
mediaTrack.height = { ideal: 1080 };
|
|
5768
|
+
}
|
|
5769
|
+
else {
|
|
5770
|
+
mediaTrack.facingMode = 'environment';
|
|
5771
|
+
mediaTrack.width = { ideal: 1280 };
|
|
5772
|
+
mediaTrack.aspectRatio = 1;
|
|
5773
|
+
}
|
|
5774
|
+
}
|
|
5775
|
+
constraints.video = mediaTrack;
|
|
5776
|
+
return constraints;
|
|
5777
|
+
}
|
|
5778
|
+
GetConstraintsIOs(device, portrait = false) {
|
|
5779
|
+
let constraints = {
|
|
5780
|
+
audio: false,
|
|
5781
|
+
};
|
|
5782
|
+
let mediaTrack = {};
|
|
5783
|
+
if (device.isDesktop) {
|
|
5784
|
+
mediaTrack.width = 1280;
|
|
5761
5785
|
}
|
|
5762
5786
|
else {
|
|
5787
|
+
mediaTrack.facingMode = 'user';
|
|
5763
5788
|
if (portrait) {
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
constraints.video.height = { ideal: 720 };
|
|
5789
|
+
mediaTrack.width = 1280;
|
|
5790
|
+
mediaTrack.height = 720;
|
|
5767
5791
|
}
|
|
5768
5792
|
else {
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
constraints.video.aspectRatio = 1;
|
|
5793
|
+
mediaTrack.facingMode = 'environment';
|
|
5794
|
+
//mediaTrack.width = 1280;
|
|
5772
5795
|
}
|
|
5773
5796
|
}
|
|
5797
|
+
constraints.video = mediaTrack;
|
|
5774
5798
|
return constraints;
|
|
5775
5799
|
}
|
|
5776
5800
|
GetRecommendedCamera(cameras) {
|
|
@@ -5862,7 +5886,7 @@ const IdBackCapture = class {
|
|
|
5862
5886
|
}
|
|
5863
5887
|
async openCamera() {
|
|
5864
5888
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
5865
|
-
|
|
5889
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5866
5890
|
setTimeout(() => {
|
|
5867
5891
|
navigator.mediaDevices
|
|
5868
5892
|
.getUserMedia(constraints)
|
|
@@ -5979,7 +6003,7 @@ const IdCapture = class {
|
|
|
5979
6003
|
}
|
|
5980
6004
|
async openCamera() {
|
|
5981
6005
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
5982
|
-
|
|
6006
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5983
6007
|
setTimeout(() => {
|
|
5984
6008
|
navigator.mediaDevices
|
|
5985
6009
|
.getUserMedia(constraints)
|
|
@@ -6262,17 +6286,20 @@ const IdSingleSide = class {
|
|
|
6262
6286
|
this.idFlow.photoFile = null;
|
|
6263
6287
|
this.idFlow.recordingFile = null;
|
|
6264
6288
|
this.showTimeout = false;
|
|
6289
|
+
this.errorMessage = '';
|
|
6265
6290
|
}
|
|
6266
6291
|
howToDone() {
|
|
6267
6292
|
this.showHowTo = false;
|
|
6268
6293
|
}
|
|
6269
6294
|
timeElapsed() {
|
|
6270
6295
|
this.showTimeout = true;
|
|
6296
|
+
this.errorMessage = 'timeout';
|
|
6271
6297
|
}
|
|
6272
6298
|
async captureIdImage(event) {
|
|
6273
6299
|
let idPhoto = event.detail;
|
|
6274
6300
|
if (idPhoto.length == 0 || idPhoto.size == 0) {
|
|
6275
6301
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
6302
|
+
this.errorMessage = 'Empty id photo';
|
|
6276
6303
|
this.showTimeout = true;
|
|
6277
6304
|
return;
|
|
6278
6305
|
}
|
|
@@ -6291,7 +6318,8 @@ const IdSingleSide = class {
|
|
|
6291
6318
|
async capturedIdRecording(event) {
|
|
6292
6319
|
let idRecording = event.detail;
|
|
6293
6320
|
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
6294
|
-
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
|
|
6321
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
6322
|
+
this.errorMessage = 'Empty id recording';
|
|
6295
6323
|
this.showTimeout = true;
|
|
6296
6324
|
return;
|
|
6297
6325
|
}
|
|
@@ -6321,6 +6349,7 @@ const IdSingleSide = class {
|
|
|
6321
6349
|
this.idFlow.photoFile = null;
|
|
6322
6350
|
this.idFlow.recordingFile = null;
|
|
6323
6351
|
this.switchCamera();
|
|
6352
|
+
this.errorMessage = 'Upload photo not successful';
|
|
6324
6353
|
this.showTimeout = true;
|
|
6325
6354
|
}
|
|
6326
6355
|
}
|
|
@@ -6335,6 +6364,7 @@ const IdSingleSide = class {
|
|
|
6335
6364
|
else {
|
|
6336
6365
|
this.idFlow.photoFile = null;
|
|
6337
6366
|
this.idFlow.recordingFile = null;
|
|
6367
|
+
this.errorMessage = 'Upload recording not successful';
|
|
6338
6368
|
this.showTimeout = true;
|
|
6339
6369
|
}
|
|
6340
6370
|
}
|
|
@@ -6364,7 +6394,7 @@ const IdSingleSide = class {
|
|
|
6364
6394
|
}
|
|
6365
6395
|
}
|
|
6366
6396
|
render() {
|
|
6367
|
-
let error = index.h("capture-error", { type: "ID" });
|
|
6397
|
+
let error = index.h("capture-error", { type: "ID", message: this.errorMessage });
|
|
6368
6398
|
let capture = index.h("id-capture", { id: "idFront" });
|
|
6369
6399
|
let howToInfo = index.h("how-to-info", { idSide: "front" });
|
|
6370
6400
|
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
@@ -6438,7 +6468,7 @@ function v4(options, buf, offset) {
|
|
|
6438
6468
|
}
|
|
6439
6469
|
|
|
6440
6470
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6441
|
-
const version$1 = "3.6.
|
|
6471
|
+
const version$1 = "3.6.2";
|
|
6442
6472
|
const description = "Person Identification Component";
|
|
6443
6473
|
const main = "./dist/index.cjs.js";
|
|
6444
6474
|
const module$1 = "./dist/index.js";
|
|
@@ -9913,7 +9943,7 @@ const SelfieCapture = class {
|
|
|
9913
9943
|
}
|
|
9914
9944
|
async openCamera() {
|
|
9915
9945
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
9916
|
-
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9946
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device, true) : this.cameras.GetConstraints('', state.device, true);
|
|
9917
9947
|
setTimeout(() => {
|
|
9918
9948
|
navigator.mediaDevices
|
|
9919
9949
|
.getUserMedia(constraints)
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"message":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_18.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"camera-error",{"title":[32],"description":[32],"buttonDisabled":[32],"demoVideo":[32]}],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"warningText":[32],"buttonDisabled":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32],"buttonEnabled":[32]}],[0,"id-capture",{"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1],"message":[1],"buttonEnabled":[32],"buttonText":[32]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32],"buttonEnabled":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -4,6 +4,7 @@ import { delay } from '../../../utils/utils';
|
|
|
4
4
|
export class CaptureError {
|
|
5
5
|
constructor() {
|
|
6
6
|
this.type = undefined;
|
|
7
|
+
this.message = undefined;
|
|
7
8
|
this.buttonEnabled = undefined;
|
|
8
9
|
this.buttonText = undefined;
|
|
9
10
|
}
|
|
@@ -35,7 +36,7 @@ export class CaptureError {
|
|
|
35
36
|
this.eventCaptureErrorDone.emit();
|
|
36
37
|
}
|
|
37
38
|
render() {
|
|
38
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
39
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), h("p", { class: "color-red font-weight-bold font-size-18 mt-5" }, this.message)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
39
40
|
}
|
|
40
41
|
static get is() { return "capture-error"; }
|
|
41
42
|
static get originalStyleUrls() {
|
|
@@ -66,6 +67,23 @@ export class CaptureError {
|
|
|
66
67
|
},
|
|
67
68
|
"attribute": "type",
|
|
68
69
|
"reflect": false
|
|
70
|
+
},
|
|
71
|
+
"message": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "string",
|
|
76
|
+
"resolved": "string",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"attribute": "message",
|
|
86
|
+
"reflect": false
|
|
69
87
|
}
|
|
70
88
|
};
|
|
71
89
|
}
|
|
@@ -66,7 +66,7 @@ export class IdBackCapture {
|
|
|
66
66
|
}
|
|
67
67
|
async openCamera() {
|
|
68
68
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
69
|
-
|
|
69
|
+
const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
|
|
70
70
|
setTimeout(() => {
|
|
71
71
|
navigator.mediaDevices
|
|
72
72
|
.getUserMedia(constraints)
|
|
@@ -62,7 +62,7 @@ export class IdCapture {
|
|
|
62
62
|
}
|
|
63
63
|
async openCamera() {
|
|
64
64
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
65
|
-
|
|
65
|
+
const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device) : this.cameras.GetConstraints(store.cameraId, store.device);
|
|
66
66
|
setTimeout(() => {
|
|
67
67
|
navigator.mediaDevices
|
|
68
68
|
.getUserMedia(constraints)
|
|
@@ -72,7 +72,7 @@ export class SelfieCapture {
|
|
|
72
72
|
}
|
|
73
73
|
async openCamera() {
|
|
74
74
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
75
|
-
const constraints = this.cameras.GetConstraints('', store.device, true);
|
|
75
|
+
const constraints = store.device.isAppleDevice ? this.cameras.GetConstraintsIOs(store.device, true) : this.cameras.GetConstraints('', store.device, true);
|
|
76
76
|
setTimeout(() => {
|
|
77
77
|
navigator.mediaDevices
|
|
78
78
|
.getUserMedia(constraints)
|
|
@@ -26,17 +26,20 @@ export class IdSingleSide {
|
|
|
26
26
|
this.idFlow.photoFile = null;
|
|
27
27
|
this.idFlow.recordingFile = null;
|
|
28
28
|
this.showTimeout = false;
|
|
29
|
+
this.errorMessage = '';
|
|
29
30
|
}
|
|
30
31
|
howToDone() {
|
|
31
32
|
this.showHowTo = false;
|
|
32
33
|
}
|
|
33
34
|
timeElapsed() {
|
|
34
35
|
this.showTimeout = true;
|
|
36
|
+
this.errorMessage = 'timeout';
|
|
35
37
|
}
|
|
36
38
|
async captureIdImage(event) {
|
|
37
39
|
let idPhoto = event.detail;
|
|
38
40
|
if (idPhoto.length == 0 || idPhoto.size == 0) {
|
|
39
41
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
42
|
+
this.errorMessage = 'Empty id photo';
|
|
40
43
|
this.showTimeout = true;
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
@@ -55,7 +58,8 @@ export class IdSingleSide {
|
|
|
55
58
|
async capturedIdRecording(event) {
|
|
56
59
|
let idRecording = event.detail;
|
|
57
60
|
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
58
|
-
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
|
|
61
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
62
|
+
this.errorMessage = 'Empty id recording';
|
|
59
63
|
this.showTimeout = true;
|
|
60
64
|
return;
|
|
61
65
|
}
|
|
@@ -85,6 +89,7 @@ export class IdSingleSide {
|
|
|
85
89
|
this.idFlow.photoFile = null;
|
|
86
90
|
this.idFlow.recordingFile = null;
|
|
87
91
|
this.switchCamera();
|
|
92
|
+
this.errorMessage = 'Upload photo not successful';
|
|
88
93
|
this.showTimeout = true;
|
|
89
94
|
}
|
|
90
95
|
}
|
|
@@ -99,6 +104,7 @@ export class IdSingleSide {
|
|
|
99
104
|
else {
|
|
100
105
|
this.idFlow.photoFile = null;
|
|
101
106
|
this.idFlow.recordingFile = null;
|
|
107
|
+
this.errorMessage = 'Upload recording not successful';
|
|
102
108
|
this.showTimeout = true;
|
|
103
109
|
}
|
|
104
110
|
}
|
|
@@ -128,7 +134,7 @@ export class IdSingleSide {
|
|
|
128
134
|
}
|
|
129
135
|
}
|
|
130
136
|
render() {
|
|
131
|
-
let error = h("capture-error", { type: "ID" });
|
|
137
|
+
let error = h("capture-error", { type: "ID", message: this.errorMessage });
|
|
132
138
|
let capture = h("id-capture", { id: "idFront" });
|
|
133
139
|
let howToInfo = h("how-to-info", { idSide: "front" });
|
|
134
140
|
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
@@ -6,7 +6,7 @@ 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 = this.GetConstraints(device.deviceId, deviceInfo);
|
|
9
|
+
const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
10
10
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
11
11
|
stream.getVideoTracks().forEach(track => {
|
|
12
12
|
var _a, _b;
|
|
@@ -67,30 +67,53 @@ export class Cameras {
|
|
|
67
67
|
GetConstraints(selectedDeviceId, device, portrait = false) {
|
|
68
68
|
let constraints = {
|
|
69
69
|
audio: false,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
};
|
|
71
|
+
let mediaTrack = {
|
|
72
|
+
frameRate: 30,
|
|
73
73
|
};
|
|
74
74
|
if (selectedDeviceId) {
|
|
75
|
-
|
|
75
|
+
mediaTrack.deviceId = {
|
|
76
76
|
exact: selectedDeviceId,
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
if (device.isDesktop) {
|
|
80
|
-
|
|
80
|
+
mediaTrack.width = { ideal: 1280 };
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
mediaTrack.facingMode = 'user';
|
|
84
|
+
if (portrait) {
|
|
85
|
+
mediaTrack.width = { ideal: 1920 };
|
|
86
|
+
mediaTrack.height = { ideal: 1080 };
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
mediaTrack.facingMode = 'environment';
|
|
90
|
+
mediaTrack.width = { ideal: 1280 };
|
|
91
|
+
mediaTrack.aspectRatio = 1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
constraints.video = mediaTrack;
|
|
95
|
+
return constraints;
|
|
96
|
+
}
|
|
97
|
+
GetConstraintsIOs(device, portrait = false) {
|
|
98
|
+
let constraints = {
|
|
99
|
+
audio: false,
|
|
100
|
+
};
|
|
101
|
+
let mediaTrack = {};
|
|
102
|
+
if (device.isDesktop) {
|
|
103
|
+
mediaTrack.width = 1280;
|
|
81
104
|
}
|
|
82
105
|
else {
|
|
106
|
+
mediaTrack.facingMode = 'user';
|
|
83
107
|
if (portrait) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
constraints.video.height = { ideal: 720 };
|
|
108
|
+
mediaTrack.width = 1280;
|
|
109
|
+
mediaTrack.height = 720;
|
|
87
110
|
}
|
|
88
111
|
else {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
constraints.video.aspectRatio = 1;
|
|
112
|
+
mediaTrack.facingMode = 'environment';
|
|
113
|
+
//mediaTrack.width = 1280;
|
|
92
114
|
}
|
|
93
115
|
}
|
|
116
|
+
constraints.video = mediaTrack;
|
|
94
117
|
return constraints;
|
|
95
118
|
}
|
|
96
119
|
GetRecommendedCamera(cameras) {
|
|
@@ -5564,6 +5564,7 @@ const CaptureError = class {
|
|
|
5564
5564
|
registerInstance(this, hostRef);
|
|
5565
5565
|
this.eventCaptureErrorDone = createEvent(this, "captureErrorDone", 7);
|
|
5566
5566
|
this.type = undefined;
|
|
5567
|
+
this.message = undefined;
|
|
5567
5568
|
this.buttonEnabled = undefined;
|
|
5568
5569
|
this.buttonText = undefined;
|
|
5569
5570
|
}
|
|
@@ -5595,7 +5596,7 @@ const CaptureError = class {
|
|
|
5595
5596
|
this.eventCaptureErrorDone.emit();
|
|
5596
5597
|
}
|
|
5597
5598
|
render() {
|
|
5598
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
5599
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("h1", { class: "color-red" }, this.titleR1), h("h1", { class: "color-red" }, this.titleR2), h("div", null, h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR1), h("p", { class: "color-red font-weight-bold font-size-25 mt-5" }, this.descriptionR2), h("p", { class: "color-red font-weight-bold font-size-18 mt-5" }, this.message)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !this.buttonEnabled, onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
5599
5600
|
}
|
|
5600
5601
|
};
|
|
5601
5602
|
CaptureError.style = captureErrorCss;
|
|
@@ -5682,7 +5683,7 @@ class Cameras {
|
|
|
5682
5683
|
const devices = await navigator.mediaDevices.enumerateDevices();
|
|
5683
5684
|
const videoDevices = devices.filter(device => device.kind === 'videoinput');
|
|
5684
5685
|
for (const device of videoDevices) {
|
|
5685
|
-
const updatedConstraints = this.GetConstraints(device.deviceId, deviceInfo);
|
|
5686
|
+
const updatedConstraints = deviceInfo.isAppleDevice ? this.GetConstraintsIOs(deviceInfo) : this.GetConstraints(device.deviceId, deviceInfo);
|
|
5686
5687
|
const stream = await navigator.mediaDevices.getUserMedia(updatedConstraints);
|
|
5687
5688
|
stream.getVideoTracks().forEach(track => {
|
|
5688
5689
|
var _a, _b;
|
|
@@ -5743,30 +5744,53 @@ class Cameras {
|
|
|
5743
5744
|
GetConstraints(selectedDeviceId, device, portrait = false) {
|
|
5744
5745
|
let constraints = {
|
|
5745
5746
|
audio: false,
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5747
|
+
};
|
|
5748
|
+
let mediaTrack = {
|
|
5749
|
+
frameRate: 30,
|
|
5749
5750
|
};
|
|
5750
5751
|
if (selectedDeviceId) {
|
|
5751
|
-
|
|
5752
|
+
mediaTrack.deviceId = {
|
|
5752
5753
|
exact: selectedDeviceId,
|
|
5753
5754
|
};
|
|
5754
5755
|
}
|
|
5755
5756
|
if (device.isDesktop) {
|
|
5756
|
-
|
|
5757
|
+
mediaTrack.width = { ideal: 1280 };
|
|
5758
|
+
}
|
|
5759
|
+
else {
|
|
5760
|
+
mediaTrack.facingMode = 'user';
|
|
5761
|
+
if (portrait) {
|
|
5762
|
+
mediaTrack.width = { ideal: 1920 };
|
|
5763
|
+
mediaTrack.height = { ideal: 1080 };
|
|
5764
|
+
}
|
|
5765
|
+
else {
|
|
5766
|
+
mediaTrack.facingMode = 'environment';
|
|
5767
|
+
mediaTrack.width = { ideal: 1280 };
|
|
5768
|
+
mediaTrack.aspectRatio = 1;
|
|
5769
|
+
}
|
|
5770
|
+
}
|
|
5771
|
+
constraints.video = mediaTrack;
|
|
5772
|
+
return constraints;
|
|
5773
|
+
}
|
|
5774
|
+
GetConstraintsIOs(device, portrait = false) {
|
|
5775
|
+
let constraints = {
|
|
5776
|
+
audio: false,
|
|
5777
|
+
};
|
|
5778
|
+
let mediaTrack = {};
|
|
5779
|
+
if (device.isDesktop) {
|
|
5780
|
+
mediaTrack.width = 1280;
|
|
5757
5781
|
}
|
|
5758
5782
|
else {
|
|
5783
|
+
mediaTrack.facingMode = 'user';
|
|
5759
5784
|
if (portrait) {
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
constraints.video.height = { ideal: 720 };
|
|
5785
|
+
mediaTrack.width = 1280;
|
|
5786
|
+
mediaTrack.height = 720;
|
|
5763
5787
|
}
|
|
5764
5788
|
else {
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
constraints.video.aspectRatio = 1;
|
|
5789
|
+
mediaTrack.facingMode = 'environment';
|
|
5790
|
+
//mediaTrack.width = 1280;
|
|
5768
5791
|
}
|
|
5769
5792
|
}
|
|
5793
|
+
constraints.video = mediaTrack;
|
|
5770
5794
|
return constraints;
|
|
5771
5795
|
}
|
|
5772
5796
|
GetRecommendedCamera(cameras) {
|
|
@@ -5858,7 +5882,7 @@ const IdBackCapture = class {
|
|
|
5858
5882
|
}
|
|
5859
5883
|
async openCamera() {
|
|
5860
5884
|
await this.baseComponent.logStep(FlowSteps.CiBackCapture, FlowMoments.Initialized);
|
|
5861
|
-
|
|
5885
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5862
5886
|
setTimeout(() => {
|
|
5863
5887
|
navigator.mediaDevices
|
|
5864
5888
|
.getUserMedia(constraints)
|
|
@@ -5975,7 +5999,7 @@ const IdCapture = class {
|
|
|
5975
5999
|
}
|
|
5976
6000
|
async openCamera() {
|
|
5977
6001
|
await this.baseComponent.logStep(FlowSteps.CiFrontCapture, FlowMoments.Initialized);
|
|
5978
|
-
|
|
6002
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device) : this.cameras.GetConstraints(state.cameraId, state.device);
|
|
5979
6003
|
setTimeout(() => {
|
|
5980
6004
|
navigator.mediaDevices
|
|
5981
6005
|
.getUserMedia(constraints)
|
|
@@ -6258,17 +6282,20 @@ const IdSingleSide = class {
|
|
|
6258
6282
|
this.idFlow.photoFile = null;
|
|
6259
6283
|
this.idFlow.recordingFile = null;
|
|
6260
6284
|
this.showTimeout = false;
|
|
6285
|
+
this.errorMessage = '';
|
|
6261
6286
|
}
|
|
6262
6287
|
howToDone() {
|
|
6263
6288
|
this.showHowTo = false;
|
|
6264
6289
|
}
|
|
6265
6290
|
timeElapsed() {
|
|
6266
6291
|
this.showTimeout = true;
|
|
6292
|
+
this.errorMessage = 'timeout';
|
|
6267
6293
|
}
|
|
6268
6294
|
async captureIdImage(event) {
|
|
6269
6295
|
let idPhoto = event.detail;
|
|
6270
6296
|
if (idPhoto.length == 0 || idPhoto.size == 0) {
|
|
6271
6297
|
await this.baseComponent.apiCall.AddLog({ message: 'Empty id photo', blobData: idPhoto }, getLogMessage());
|
|
6298
|
+
this.errorMessage = 'Empty id photo';
|
|
6272
6299
|
this.showTimeout = true;
|
|
6273
6300
|
return;
|
|
6274
6301
|
}
|
|
@@ -6287,7 +6314,8 @@ const IdSingleSide = class {
|
|
|
6287
6314
|
async capturedIdRecording(event) {
|
|
6288
6315
|
let idRecording = event.detail;
|
|
6289
6316
|
if (idRecording.length == 0 || idRecording.size == 0) {
|
|
6290
|
-
await this.baseComponent.apiCall.AddLog({ message: 'Empty recording', blobData: idRecording }, getLogMessage());
|
|
6317
|
+
await this.baseComponent.apiCall.AddLog({ message: 'Empty ID recording', blobData: idRecording }, getLogMessage());
|
|
6318
|
+
this.errorMessage = 'Empty id recording';
|
|
6291
6319
|
this.showTimeout = true;
|
|
6292
6320
|
return;
|
|
6293
6321
|
}
|
|
@@ -6317,6 +6345,7 @@ const IdSingleSide = class {
|
|
|
6317
6345
|
this.idFlow.photoFile = null;
|
|
6318
6346
|
this.idFlow.recordingFile = null;
|
|
6319
6347
|
this.switchCamera();
|
|
6348
|
+
this.errorMessage = 'Upload photo not successful';
|
|
6320
6349
|
this.showTimeout = true;
|
|
6321
6350
|
}
|
|
6322
6351
|
}
|
|
@@ -6331,6 +6360,7 @@ const IdSingleSide = class {
|
|
|
6331
6360
|
else {
|
|
6332
6361
|
this.idFlow.photoFile = null;
|
|
6333
6362
|
this.idFlow.recordingFile = null;
|
|
6363
|
+
this.errorMessage = 'Upload recording not successful';
|
|
6334
6364
|
this.showTimeout = true;
|
|
6335
6365
|
}
|
|
6336
6366
|
}
|
|
@@ -6360,7 +6390,7 @@ const IdSingleSide = class {
|
|
|
6360
6390
|
}
|
|
6361
6391
|
}
|
|
6362
6392
|
render() {
|
|
6363
|
-
let error = h("capture-error", { type: "ID" });
|
|
6393
|
+
let error = h("capture-error", { type: "ID", message: this.errorMessage });
|
|
6364
6394
|
let capture = h("id-capture", { id: "idFront" });
|
|
6365
6395
|
let howToInfo = h("how-to-info", { idSide: "front" });
|
|
6366
6396
|
return this.showHowTo ? howToInfo : this.showTimeout ? error : capture;
|
|
@@ -6434,7 +6464,7 @@ function v4(options, buf, offset) {
|
|
|
6434
6464
|
}
|
|
6435
6465
|
|
|
6436
6466
|
const name = "@ekyc_qoobiss/qbs-ect-cmp";
|
|
6437
|
-
const version$1 = "3.6.
|
|
6467
|
+
const version$1 = "3.6.2";
|
|
6438
6468
|
const description = "Person Identification Component";
|
|
6439
6469
|
const main = "./dist/index.cjs.js";
|
|
6440
6470
|
const module = "./dist/index.js";
|
|
@@ -9909,7 +9939,7 @@ const SelfieCapture = class {
|
|
|
9909
9939
|
}
|
|
9910
9940
|
async openCamera() {
|
|
9911
9941
|
await this.baseComponent.logStep(FlowSteps.SelfieCapture, FlowMoments.Initialized);
|
|
9912
|
-
const constraints = this.cameras.GetConstraints('', state.device, true);
|
|
9942
|
+
const constraints = state.device.isAppleDevice ? this.cameras.GetConstraintsIOs(state.device, true) : this.cameras.GetConstraints('', state.device, true);
|
|
9913
9943
|
setTimeout(() => {
|
|
9914
9944
|
navigator.mediaDevices
|
|
9915
9945
|
.getUserMedia(constraints)
|