@ekyc_qoobiss/qbs-ect-cmp 4.7.20 → 4.7.22
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-info_23.cjs.entry.js +18 -6
- package/dist/cjs/agreement-info_23.cjs.entry.js.map +1 -1
- package/dist/collection/components/common/id-auto-capture/id-auto-capture.js +17 -5
- package/dist/collection/components/common/id-auto-capture/id-auto-capture.js.map +1 -1
- package/dist/esm/agreement-info_23.entry.js +18 -6
- package/dist/esm/agreement-info_23.entry.js.map +1 -1
- package/dist/qbs-ect-cmp/{p-bac36dff.entry.js → p-c90d6e07.entry.js} +3 -3
- package/dist/qbs-ect-cmp/p-c90d6e07.entry.js.map +1 -0
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/package.json +1 -1
- package/dist/qbs-ect-cmp/p-bac36dff.entry.js.map +0 -1
|
@@ -529,11 +529,11 @@ const IdAutoCapture = class {
|
|
|
529
529
|
this.isDetecting = false;
|
|
530
530
|
this.opencvReady = false;
|
|
531
531
|
this.isCapturing = false;
|
|
532
|
-
this.handleOpencvReady = () => {
|
|
532
|
+
this.handleOpencvReady = async () => {
|
|
533
533
|
this.opencvReady = true;
|
|
534
534
|
console.log('OpenCV.js loaded. Ready to start detection.');
|
|
535
|
-
this.getMedia(); // Get camera media once OpenCV is ready
|
|
536
|
-
this.handleStartDetection(); // Start processing video frames
|
|
535
|
+
await this.getMedia(); // Get camera media once OpenCV is ready
|
|
536
|
+
await this.handleStartDetection(); // Start processing video frames
|
|
537
537
|
};
|
|
538
538
|
// Method to start video recording
|
|
539
539
|
this.startRecording = () => {
|
|
@@ -690,7 +690,7 @@ const IdAutoCapture = class {
|
|
|
690
690
|
}
|
|
691
691
|
};
|
|
692
692
|
// Handler for starting the ID detection process
|
|
693
|
-
this.handleStartDetection = () => {
|
|
693
|
+
this.handleStartDetection = async () => {
|
|
694
694
|
if (!this.mediaStream) {
|
|
695
695
|
console.log('Camera not ready. Please allow camera access.');
|
|
696
696
|
return;
|
|
@@ -705,6 +705,18 @@ const IdAutoCapture = class {
|
|
|
705
705
|
this.recordedChunks = []; // Clear previous video chunks
|
|
706
706
|
this.recordedVideoUrl = null; // Clear previous video URL
|
|
707
707
|
this.startRecording();
|
|
708
|
+
if (this.videoElement && this.videoElement.readyState < 3) {
|
|
709
|
+
// Use readyState 3 (HAVE_FUTURE_DATA) or 4 (HAVE_ENOUGH_DATA) for more robust readiness
|
|
710
|
+
console.log('Waiting for video stream to fully load...');
|
|
711
|
+
await new Promise(resolve => {
|
|
712
|
+
const onCanPlayThrough = () => {
|
|
713
|
+
this.videoElement.removeEventListener('canplaythrough', onCanPlayThrough);
|
|
714
|
+
resolve();
|
|
715
|
+
};
|
|
716
|
+
this.videoElement.addEventListener('canplaythrough', onCanPlayThrough);
|
|
717
|
+
});
|
|
718
|
+
console.log('Video stream ready. Starting detection.');
|
|
719
|
+
}
|
|
708
720
|
this.startFrameProcessing(); // Start the OpenCV frame processing loop
|
|
709
721
|
};
|
|
710
722
|
this.verified = false;
|
|
@@ -778,7 +790,7 @@ const IdAutoCapture = class {
|
|
|
778
790
|
if (TranslationUtils.state.device.isDesktop) {
|
|
779
791
|
cameraVideoClass = 'cameraVideoSelfieDesk';
|
|
780
792
|
}
|
|
781
|
-
return (index.h("div", { key: '
|
|
793
|
+
return (index.h("div", { key: '4bb0f88b1af2b60c0340d193e5b55b20216959f4', class: "container flex center" }, index.h("div", { key: '91edb8cd88cc514d356f6dbc33d42a0fd4c59403', class: "px-2 w-100" }, index.h("h1", { key: 'ddfd52905a3f4e57140a77eead1019d0a5f8fd8d', class: this.titleStyle, innerHTML: this.titleMesage }), index.h("div", { key: '11a1eba365aa8cac67127daf11c8773c9ebb18d7', hidden: this.verified }, index.h("div", { key: '710dbd4a39607139ef8f9b9bfaa6e8a753e7cb84', class: "w-100 h-100 rounded" }, index.h("div", { key: 'b48ac855f6ea3c2244160bc8c2c0ed76c0eaaea0', class: "camera rounded" }, index.h("video", { key: '688fa43c1a703449cafae6b1039768dc271b65aa', id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.videoElement = el) }), index.h("canvas", { key: 'ed924ec293a47f69a1a61d3b3d5e745e92a5419b', id: "output", ref: el => (this.canvasElement = el), style: { display: 'none' } }), index.h("canvas", { key: 'f6807b2574c3e981f915228b45af3f8bd7ee5c9d', id: "processingCanvasElement", ref: el => (this.processingCanvasElement = el), style: { display: 'none' } }), index.h("div", { key: '812da2b6ad46757f8af703ec236996019f40480d', class: "id-guide-rectangle" }), this.isCapturing && index.h("div", { key: 'aa58dc533dac04f7917c2dba9626ff2213a298bc', class: "capture-flash-overlay" }), this.countdown > 0 && (index.h("div", { key: 'f0a3e788cc150037b2a9540f4656ba733f276bd5', class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center" }, index.h("span", { key: '8c22c9ef5dd0763cc6b0fb967e25759ca6a0f8f0', class: "text-white text-9xl font-bold animate-bounce" }, this.countdown)))))), index.h("div", { key: '0b7ee521152325ef637809a009a5ad719ed4286e', class: "footer text-center" }, index.h("img", { key: 'bbd817f0b9460e4be2121501a1b87e8bbc15831a', src: Cameras.logoOntraceSvg })))));
|
|
782
794
|
}
|
|
783
795
|
get el() { return index.getElement(this); }
|
|
784
796
|
};
|
|
@@ -843,7 +855,7 @@ const IdSelection = class {
|
|
|
843
855
|
};
|
|
844
856
|
IdSelection.style = idSelectionCss;
|
|
845
857
|
|
|
846
|
-
const version$1 = "4.7.
|
|
858
|
+
const version$1 = "4.7.22";
|
|
847
859
|
var packageJson = {
|
|
848
860
|
version: version$1};
|
|
849
861
|
|