scandoc-ai-components 0.0.44 → 0.0.45
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/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11222,8 +11222,14 @@ class ExtractorVideo {
|
|
|
11222
11222
|
//
|
|
11223
11223
|
const canvas = document.createElement("canvas");
|
|
11224
11224
|
let video = document.getElementById("ScanDocAIVideoElement");
|
|
11225
|
+
if (video && video.videoWidth < video.videoHeight) {
|
|
11226
|
+
this.showMessage("Please rotate your device to landscape mode.");
|
|
11227
|
+
this.candidateImages = [];
|
|
11228
|
+
setTimeout(() => this.analyzeVideoStream(), ExtractorVideo.FREQUENCY_MS);
|
|
11229
|
+
return;
|
|
11230
|
+
}
|
|
11225
11231
|
//
|
|
11226
|
-
const fullImage = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.videoImgToBase64)(video, canvas,
|
|
11232
|
+
const fullImage = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.videoImgToBase64)(video, canvas, 1280, 720, false);
|
|
11227
11233
|
const validationImage = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.videoImgToBase64)(video, canvas, ExtractorVideo.VALIDATION_IMG_WIDTH, ExtractorVideo.VALIDATION_IMG_HEIGHT, true);
|
|
11228
11234
|
DOCUMENT_DETECTOR.isDocumentPresent(video).then(async isPresent => {
|
|
11229
11235
|
if (isPresent) {
|