@ekyc_qoobiss/qbs-ect-cmp 4.7.21 → 4.7.23
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 -5
- 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 -4
- package/dist/collection/components/common/id-auto-capture/id-auto-capture.js.map +1 -1
- package/dist/esm/agreement-info_23.entry.js +18 -5
- package/dist/esm/agreement-info_23.entry.js.map +1 -1
- package/dist/qbs-ect-cmp/{p-dd0fe423.entry.js → p-7c03c427.entry.js} +3 -3
- package/dist/qbs-ect-cmp/p-7c03c427.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-dd0fe423.entry.js.map +0 -1
|
@@ -533,7 +533,7 @@ const IdAutoCapture = class {
|
|
|
533
533
|
this.opencvReady = true;
|
|
534
534
|
console.log('OpenCV.js loaded. Ready to start detection.');
|
|
535
535
|
await this.getMedia(); // Get camera media once OpenCV is ready
|
|
536
|
-
this.handleStartDetection(); // Start processing video frames
|
|
536
|
+
await this.handleStartDetection(); // Start processing video frames
|
|
537
537
|
};
|
|
538
538
|
// Method to start video recording
|
|
539
539
|
this.startRecording = () => {
|
|
@@ -600,7 +600,8 @@ const IdAutoCapture = class {
|
|
|
600
600
|
context.drawImage(video, 0, 0, processingCanvas.width, processingCanvas.height);
|
|
601
601
|
const imageData = context.getImageData(0, 0, processingCanvas.width, processingCanvas.height);
|
|
602
602
|
// --- OpenCV.js processing starts here ---
|
|
603
|
-
let src = cv.
|
|
603
|
+
let src = new cv.Mat(processingCanvas.height, processingCanvas.width, cv.CV_8UC4);
|
|
604
|
+
src.data.set(imageData.data);
|
|
604
605
|
let gray = new cv.Mat();
|
|
605
606
|
let blurred = new cv.Mat();
|
|
606
607
|
let edges = new cv.Mat();
|
|
@@ -690,7 +691,7 @@ const IdAutoCapture = class {
|
|
|
690
691
|
}
|
|
691
692
|
};
|
|
692
693
|
// Handler for starting the ID detection process
|
|
693
|
-
this.handleStartDetection = () => {
|
|
694
|
+
this.handleStartDetection = async () => {
|
|
694
695
|
if (!this.mediaStream) {
|
|
695
696
|
console.log('Camera not ready. Please allow camera access.');
|
|
696
697
|
return;
|
|
@@ -705,6 +706,18 @@ const IdAutoCapture = class {
|
|
|
705
706
|
this.recordedChunks = []; // Clear previous video chunks
|
|
706
707
|
this.recordedVideoUrl = null; // Clear previous video URL
|
|
707
708
|
this.startRecording();
|
|
709
|
+
if (this.videoElement && this.videoElement.readyState < 3) {
|
|
710
|
+
// Use readyState 3 (HAVE_FUTURE_DATA) or 4 (HAVE_ENOUGH_DATA) for more robust readiness
|
|
711
|
+
console.log('Waiting for video stream to fully load...');
|
|
712
|
+
await new Promise(resolve => {
|
|
713
|
+
const onCanPlayThrough = () => {
|
|
714
|
+
this.videoElement.removeEventListener('canplaythrough', onCanPlayThrough);
|
|
715
|
+
resolve();
|
|
716
|
+
};
|
|
717
|
+
this.videoElement.addEventListener('canplaythrough', onCanPlayThrough);
|
|
718
|
+
});
|
|
719
|
+
console.log('Video stream ready. Starting detection.');
|
|
720
|
+
}
|
|
708
721
|
this.startFrameProcessing(); // Start the OpenCV frame processing loop
|
|
709
722
|
};
|
|
710
723
|
this.verified = false;
|
|
@@ -778,7 +791,7 @@ const IdAutoCapture = class {
|
|
|
778
791
|
if (TranslationUtils.state.device.isDesktop) {
|
|
779
792
|
cameraVideoClass = 'cameraVideoSelfieDesk';
|
|
780
793
|
}
|
|
781
|
-
return (index.h("div", { key: '
|
|
794
|
+
return (index.h("div", { key: '32fa99f679fbbc0009608aeb2eeb26645dbadb59', class: "container flex center" }, index.h("div", { key: '08ee0848724b359253d27120fe5e2751372cab1e', class: "px-2 w-100" }, index.h("h1", { key: '570154c491f44b72f5a6794f17b1a19c964a55e5', class: this.titleStyle, innerHTML: this.titleMesage }), index.h("div", { key: '2a626737524f5748e4d6faeb109f3dc59fe3388b', hidden: this.verified }, index.h("div", { key: 'f38962922b06f902790d9d549c3d1c507cafb8b8', class: "w-100 h-100 rounded" }, index.h("div", { key: '7c69f659183dfdfab7ea759c1a5a574af19df679', class: "camera rounded" }, index.h("video", { key: '7f378deee95b9821715add1f9b66e9299b6e4380', id: "video", loop: true, autoplay: true, playsinline: true, muted: true, class: cameraVideoClass, ref: el => (this.videoElement = el) }), index.h("canvas", { key: '8150fbc30e908e011f415b73a0e3f2d8711f2d20', id: "output", ref: el => (this.canvasElement = el), style: { display: 'none' } }), index.h("canvas", { key: '54887d1f9266d32f653760ff6e70971e2d525c0a', id: "processingCanvasElement", ref: el => (this.processingCanvasElement = el), style: { display: 'none' } }), index.h("div", { key: 'cf656641dcb1cf1bf845c28a97630c72f7da8fe6', class: "id-guide-rectangle" }), this.isCapturing && index.h("div", { key: 'eabb935e014eb3966940a27a5aa100477249dbba', class: "capture-flash-overlay" }), this.countdown > 0 && (index.h("div", { key: 'e8a05e21e03673637e0194b3d967ed0044891a01', class: "absolute inset-0 bg-black bg-opacity-50 flex items-center justify-center" }, index.h("span", { key: 'f6996d51686b935aa4aaa6f2abe4062d5782c116', class: "text-white text-9xl font-bold animate-bounce" }, this.countdown)))))), index.h("div", { key: 'd4fc6a0ff5951767a43f9166fcf47f98b4d209a7', class: "footer text-center" }, index.h("img", { key: 'a84cc0c65a6684807abf314d9839babe16768494', src: Cameras.logoOntraceSvg })))));
|
|
782
795
|
}
|
|
783
796
|
get el() { return index.getElement(this); }
|
|
784
797
|
};
|
|
@@ -843,7 +856,7 @@ const IdSelection = class {
|
|
|
843
856
|
};
|
|
844
857
|
IdSelection.style = idSelectionCss;
|
|
845
858
|
|
|
846
|
-
const version$1 = "4.7.
|
|
859
|
+
const version$1 = "4.7.23";
|
|
847
860
|
var packageJson = {
|
|
848
861
|
version: version$1};
|
|
849
862
|
|