Coder Social home page Coder Social logo

blinkcard-in-browser's People

Contributors

antonioerdeljac avatar joelhoelting avatar lukavrtaric avatar mirzamesic777 avatar vjekoart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blinkcard-in-browser's Issues

Cancelling recognition after first side of card is scanned.

We only require user to scan the first of the card. Therefore upon successful scan of the first side, we cancelRecognition.

     onFirstSideResult: () => {
        videoRecognizer?.cancelRecognition();
      },

It is working as expected but was wondering if there is any downsides of doing this? Is there any other alternative solutions to the above? I see that this was a recommend solution on a previous post https://help.microblink.com/s/direct-article?Article=ka08W000000st3HQAQ. However this solution has drawbacks since it dose not work for all card types. I'm curious as to why the above link is the recommended solution vs just cancelRecognition.

Readme examples are not up to date

After updating to version 2.7.0 and using the example code:

try
{
    const videoRecognizer = await BlinkCardSDK.VideoRecognizer.createVideoRecognizerFromCameraStream(
        cameraFeed,
        recognizerRunner
    );

    // There is more than one way to handle recognition

    // Using the recognize() method will provide you with the default behavior,
    // such as built-in error handling, timeout and video feed pausing.
    const processResult = await videoRecognizer.recognize();

    // Using the startRecognition() method allows you to pass your own onScanningDone callback, 
    // giving you the option to create custom behavior.
    const processResult = await videoRecognizer.startRecognition(
        async ( recognitionState ) => 
        {
            videoRecognizer.pauseRecognition();
            return recognitionState;
        }
    );

    // To obtain recognition results see next step
}
catch ( error )
{
    if ( error.name === "VideoRecognizerError" )
    {
        // Reason is of type BlinkCardSDK.NotSupportedReason and contains information why video
        // recognizer could not be used. Usually this happens when user didn't grant access to a
        // camera or when a hardware or OS error occurs.
        const reason = ( error as BlinkCardSDK.VideoRecognizerError ).reason;
    }
}

It appears that the VideoRecognizerError no longer exists on the BlinkCardSDK object:BlinkCardSDK.VideoRecognizerError. It appears that the example used in the readme and the example folder needs to get updated.

Scanner not effectively scanning compared to Blinkcard in-browser demo

Hello,

The issue I am having is that my implementation of the in-browser scanner is not scanning efficiently compared to the demo here: https://demo.microblink.com/in-browser-sdk/blinkcard. The videoRecognizer instance is awaiting a scan, however the scan sometimes does not trigger. Other times the scanner requires 20-30 seconds before the scan is triggered.

I have the scanner working on a test URL: https://blinkcard.joelhoelting.com/
Github Code: https://github.com/joelhoelting/blinkcard-test-next

I followed all the directions directly from the documentation here (https://github.com/blinkcard/blinkcard-in-browser#installation)

Any assistance would be appreciated. Thank you for your library.

Not receiving callback after first side scan

I'm using the callback:

const callbacks = {
    onQuadDetection: (quad) => drawQuad(quad),
    onDetectionFailed: () => updateScanFeedback("Detection failed", true),
    onFirstSideResult: () => {
        console.log("First side complete")
        alert("Flip the document")
    }
  };

const recognizerRunner = await BlinkCardSDK.createRecognizerRunner(
    sdk,
    [blinkCardRecognizer],
    false,
    callbacks
  );

But I'm not getting any callback for onFirstSideResult.
I'm getting the results directly after scanning the first side.

Explain me please this error: Licence Error

Error init sdk: {message: Internal Error( server permission expired), code: LICENCE_UNLOCK_ERROR, details: Permission expired .
What does it mean?
Device : Realme c25y
Android version: 11
Browser : Chrome last version

DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:4200/BlinkCardWasmSDK.js' failed to load

I am trying to get this credit card reader to work on my angular application. I followed all the steps in the read me and got a license key as well but for some reason I am getting the following error

Error during the initialization of the SDK! DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:4200/BlinkCardWasmSDK.js' failed to load.

in my component I have the following method implemented from the instructions:

 scanCard() {
    if ( BlinkCardSDK.isBrowserSupported() ) {
      const loadSettings = new BlinkCardSDK.WasmSDKLoadSettings( 'sRwAAAYJbG9jYWxob3NjpmqGCINgvA==' );

      BlinkCardSDK.loadWasmModule( loadSettings ).then
      (
        ( wasmSDK: BlinkCardSDK.WasmSDK ) => {
          // The SDK was initialized successfully, save the wasmSDK for future use
          BlinkCardSDK.createBlinkCardRecognizer( wasmSDK ).then(recognizer => {
            BlinkCardSDK.createRecognizerRunner( wasmSDK, [ recognizer ], true ).then(recognizerRunner => {
              const cameraFeed = document.getElementById( 'myCameraVideoElement' ) as HTMLVideoElement;
              BlinkIDSDK.VideoRecognizer.createVideoRecognizerFromCameraStream(cameraFeed, recognizerRunner)
                .then(videoRecognizer => {
                  videoRecognizer.recognize().then(processResult => {
                    if ( processResult !== BlinkIDSDK.RecognizerResultState.Empty ) {
                     recognizer.getResult().then(recognitionResult => {
                       console.log( recognitionResult );

                     });
                    } else {
                      console.log( 'Recognition was not successful!' );
                    }
                    console.log(processResult);
                  });

              });
            });

          });
        },
        ( error: any ) => {
          // Error happened during the initialization of the SDK
          console.log( 'Error during the initialization of the SDK!', error );
        });
    } else {
      console.log( 'This browser is not supported by the SDK!' );
    }
  }

in the html I have:

<video id="videoElement">

I have added the BlinkCardWasmSDK.js in the /src/assets/BlinkCardWasmSDK.js but it still gives me the error. Am I missing a reference or something? Thanks in advance for the help.

In the browser I get the following error
zone-evergreen.js:171 Uncaught Error: Unknown message action: undefined at context.onmessage (BlinkCardWasmSDK.worker.min.js:15) at wrapFn (zone-evergreen.js:1218) at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Zone.runTask (zone-evergreen.js:167) at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480) at invokeTask (zone-evergreen.js:1621) at globalZoneAwareCallback (zone-evergreen.js:1647)

Explain me this error: Problem during initialization of worker file

Log shows: Error initialization of sdk : "Problem during initialization of worker file" . Also on second try it works, then on third try it shows: Error initialization of sdk: {message: Failed to load WASM in web worker!, code: WORKER_WASM_LOAD_FAILURE, details:{} }, Could someone explain what is the problem? THANK U IN ADVANCE

getting promise pending for BlinkCardSDK.loadWasmModule(loadSettings)

(SDK NOT WORKING) Getting mimetype error in chrome browser while loading sdk

Hi,
I am using Chrome to test this SDK.
but getting some error from sdk it seems..

Kindly give us a workaround for this issue ..
I am using below mentioned chrome version ..

Google Chrome	90.0.4430.93 (Official Build) (64-bit) (cohort: Stable)
Revision	4df112c29cfe9a2c69b14195c0275faed4e997a7-refs/branch-heads/4430@{#1348}
OS	Windows 10 OS Version 2009 (Build 19042.928)
JavaScript	V8 9.0.257.23
User Agent	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36

image

Scan for single side of the card

Is it possible to scan the single side of the card only which returns the data if scan success. Which recognizer I need to use for single side card scanning.

Thanks,
Prashant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.