Coder Social home page Coder Social logo

Comments (5)

AngTim avatar AngTim commented on August 11, 2024

Hello Yashikaraheja,

Thank you for the inquiry.
From the mentioned issue and the code snippet you have shared with us, it seems like you are not hosting the engine and worker location on the same path locally. Can you please check the following help article https://help.microblink.com/s/direct-article?Article=ka08W000000st37QAA and modify the path accordingly to have it match for engine location as it is for the worker location.

Test this approach and let me know if you have any additional questions or issues we can assist you with.

Kind regards,
Angelo
Web Support Specialist
Microblink

from blinkcard-in-browser.

yashikaraheja avatar yashikaraheja commented on August 11, 2024

app.js:185 Uncaught (in promise)
SDKError {message: 'Media devices not supported by browser.', code: 'VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED', details: {…}}
code
:
"VIDEO_RECOGNIZER_MEDIA_DEVICES_UNSUPPORTED"
details
:
{reason: 'MediaDevicesNotSupported'}
message
:
"Media devices not supported by browser."
[[Prototype]]
:
Object

Getting this error now I am using edge and chrome, its not working in any of them

from blinkcard-in-browser.

AngTim avatar AngTim commented on August 11, 2024

Hello Yashikaraheja,

One of the possible reasons for this error with 'MediaDevicesNotSupported', could be due to permissions policy, and it could be helpful to try and access the application with the HTTPS protocol, as media devices can be blocked due to insecure browser context:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Permissions_Policy

NotAllowedError DOMException
Thrown if one or more of the requested source devices cannot be used at this time. This will happen if the browsing context is insecure (that is, the page was loaded using HTTP rather than HTTPS). It also happens if the user has specified that the current browsing instance is not permitted access to the device, the user has denied access for the current session, or the user has denied all access to user media devices globally. On browsers that support managing media permissions with Permissions Policy, this error is returned if Permissions Policy is not configured to allow access to the input source(s).

And you can also find more about the error from our documentation:
https://github.com/blinkcard/blinkcard-in-browser/blob/5f2c6a486e3f0244c8cf6de0329fadd47ee2e4a1/src/MicroblinkSDK/VideoRecognizer.ts#L32C5-L32C29

Kind regards,
Angelo

from blinkcard-in-browser.

yashikaraheja avatar yashikaraheja commented on August 11, 2024

Thanks it resolved the issue in my local

from blinkcard-in-browser.

yashikaraheja avatar yashikaraheja commented on August 11, 2024

Now i am facing another issue, i am trying to integrate in my company project which is backbone js based

i added a model class

define([], function () {
'use strict*;
const initialMessaget1 - document-getelementById("msg");
const progressEl - document.getelementById(load-progress");
// UI elements for scanning feedback
const cameraFeed - document. getElementByld("camera-feed") 3
const cameraFeedback - document. getelementBy!Id("camera-feedback") :
const drawcontext = cameraFeedback 8& cameraFeedback.getcontext("2d") ;
const scanFeedback - document. getelementById("camera-guides
):
return FIL.Core.Model.extend ({

  • Initialize and load WASM SDK.
    initialize: function() {
    // check if browser has proper support for WebAssembly
    if (IBlinkCardsok. isBrowserSupported())
    {
    initialMessageEl. innerText = "This browser is not supported!";

returns;
}
// 1. It's possible to obtain a free trial license key on microblink.com
let licensekey =
*SRWAAAYVZmIkZwxpdHkuY2FyZC5zY2FubmVyVKMGr013POEGNfvyF5adUhJAt1SGnUsMmIUJO1KWNL.nqVPM8Y58SONZZktOcYT7Y8qR1c4H8mje7DN/StQcEbnwU3C4BaAU1PMEUQ0YC1Ba/NVZUeU73LyXMLZnI/kwNMjucr7hYux9yxdXT8:
if (window. location. hostname==="blinkcard.github.io”)
{
licenseKey =
"SRWAAAYTYmxpbmtjYX>kLmdpdGh1Yi5pby+N7zvPySD9Mbe+K362×H841POSUiZTDjd3UMrotMvNG40WJpwsc8vh+SYmFWkssv+Biodkzoa6iMHgneL.nPJx01p3rcRal8VRJUJ0098xSeGazX90jyjXMsDBoBm3tor+672Wr3f03Dg17u9;
if (window. location. hostname === "localhost. fidelity.co.uk")
{
licensekey =
"SRWAAAVYbG9 jYwxob3NOLmZpZGV/SaXR5LmNVLnVrIRJ j×9Ez+Mnwx5kozdG6DKP6reRszbMTfDND6p1H2rQ1AQ2a3jyACfVDNqvskbRK206n5pzN9igpdxeuuvDJsPhmQQDWhS7Av/up7AVL.11.JDz8y+8wtAQPN'mBgNJoumd+kg2GTU/OP”

Rest same code
And in index.html
I added script for cdn blinkcard

but now i am getting error that BlinkCardSDK not defined. This is for web

from blinkcard-in-browser.

Related Issues (13)

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.