scandoc-ai-components 0.0.46 → 0.0.47
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/README.md +26 -10
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -50,11 +50,19 @@ An example HTML page integration:
|
|
|
50
50
|
SHOULD_RETURN_FACE_IF_DETECTED: true,
|
|
51
51
|
SHOULD_RETURN_SIGNATURE_IF_DETECTED: true,
|
|
52
52
|
SKIP_DOCUMENT_SIZE_CHECK: true,
|
|
53
|
+
MAX_SCAN_DURATION_MS: 15000,
|
|
54
|
+
MAX_UNSUPPORTED_ATTEMPTS: 5,
|
|
53
55
|
});
|
|
54
56
|
|
|
55
|
-
const extractionVideo = getExtractionVideo(function (
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
const extractionVideo = getExtractionVideo(function (result) {
|
|
58
|
+
console.log("Extraction Result:", result);
|
|
59
|
+
if (result.success) {
|
|
60
|
+
extractionVideo.reset();
|
|
61
|
+
extractionVideo.startVideo();
|
|
62
|
+
} else {
|
|
63
|
+
extractionVideo.reset();
|
|
64
|
+
extractionVideo.startVideo();
|
|
65
|
+
}
|
|
58
66
|
});
|
|
59
67
|
|
|
60
68
|
const html = extractionVideo.getHTML();
|
|
@@ -77,15 +85,23 @@ import "scandoc-ai-components/dist/index"
|
|
|
77
85
|
const key = ""; // Use the key provided by our team
|
|
78
86
|
window.createScanDocAIConfig(key, "test");
|
|
79
87
|
window.setScanDocAIConfig({
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
SHOULD_RETURN_DOCUMENT_IMAGE: true,
|
|
89
|
+
SHOULD_RETURN_FACE_IF_DETECTED: true,
|
|
90
|
+
SHOULD_RETURN_SIGNATURE_IF_DETECTED: true,
|
|
91
|
+
SKIP_DOCUMENT_SIZE_CHECK: true,
|
|
92
|
+
MAX_SCAN_DURATION_MS: 15000,
|
|
93
|
+
MAX_UNSUPPORTED_ATTEMPTS: 4,
|
|
84
94
|
});
|
|
85
95
|
|
|
86
|
-
const extractionVideo = window.getExtractionVideo(
|
|
87
|
-
console.log("
|
|
88
|
-
|
|
96
|
+
const extractionVideo = window.getExtractionVideo(result => {
|
|
97
|
+
console.log("Extraction Result:", result);
|
|
98
|
+
if (result.success) {
|
|
99
|
+
extractionVideo.reset();
|
|
100
|
+
extractionVideo.startVideo();
|
|
101
|
+
} else {
|
|
102
|
+
extractionVideo.reset();
|
|
103
|
+
extractionVideo.startVideo();
|
|
104
|
+
}
|
|
89
105
|
});
|
|
90
106
|
|
|
91
107
|
function App() {
|
package/dist/index.js
CHANGED
|
@@ -11277,6 +11277,7 @@ class ExtractorVideo {
|
|
|
11277
11277
|
};
|
|
11278
11278
|
//
|
|
11279
11279
|
if (Object.keys(extractionImages).length === 1) {
|
|
11280
|
+
this.scanStartTime = Date.now();
|
|
11280
11281
|
this.showMessage("Turn to the other side");
|
|
11281
11282
|
}
|
|
11282
11283
|
if (Object.keys(extractionImages).length === 2) {
|