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.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. 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, video.videoWidth, video.videoHeight, false);
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scandoc-ai-components",
3
3
  "author": "ScanDoc-AI",
4
- "version": "0.0.44",
4
+ "version": "0.0.45",
5
5
  "private": false,
6
6
  "description": "Pure JavaScript package for integrating ScanDoc-AI services.",
7
7
  "keywords": [