instascan icon indicating copy to clipboard operation
instascan copied to clipboard

Cant see camera in DOM

Open harshad5498 opened this issue 4 years ago • 8 comments

The camera is starting, in notification bar its showing camera is accessing by localhost:4200 but i am not getting view in DOM code in html:- <video id="preview" #preview class="border border-dark w-100 h-100 mx-auto"> code of typescript;- var scanner = new Instascan.Scanner( { video: document.getElementById('preview'), mirror: false }); console.log(scanner); Instascan.Camera.getCameras().then(cameras => { if (cameras.length > 0) { alert("camera on "+cameras.length); if(cameras.length>1){ scanner.start(cameras[1]); } else{ scanner.start(cameras[0]); } } else { Swal.fire({ title: "Cannot start camera", text: "Cannot start camera or you denied the permission for camera check site settings", icon: "info" }); } }).catch(error => { Swal.fire({ title: "Cannot start camera", text: "Cannot get Camera"+error, icon: "info" }); });

scanner.addListener('scan', function (content) {
	console.log("code",content);
}); 

harshad5498 avatar Mar 13 '20 07:03 harshad5498

Are you also getting in console this error ?

invalid asm.js: Type mismatch in assignment (anonymous) @ Index:46 Promise.then (async) (anonymous) @ Index:44 instascan.min.js:9 Uncaught (in promise) TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. at e.<anonymous> (instascan.min.js:9) at t (instascan.min.js:7) at Generator._invoke (instascan.min.js:7) at Generator.e.<computed> [as next] (instascan.min.js:7) at t (instascan.min.js:7) at r (instascan.min.js:7) at instascan.min.js:7

Norc89 avatar Mar 30 '20 10:03 Norc89

Use this build and you will be able to use it(is from demo). https://rawgit.com/schmich/instascan-builds/master/instascan.min.js

Can please somebody recreate latest release build.

Thanks

Norc89 avatar Mar 30 '20 11:03 Norc89

Yes

On Mon, Mar 30, 2020, 4:29 PM MiselM [email protected] wrote:

Are you also getting in console this error ?

invalid asm.js: Type mismatch in assignment (anonymous) @ Index:46 Promise.then (async) (anonymous) @ Index:44 instascan.min.js:9 Uncaught (in promise) TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided. at e. (instascan.min.js:9) at t (instascan.min.js:7) at Generator._invoke (instascan.min.js:7) at Generator.e. [as next] (instascan.min.js:7) at t (instascan.min.js:7) at r (instascan.min.js:7) at instascan.min.js:7

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/schmich/instascan/issues/241#issuecomment-605932171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMEJGJ6G7S22ELSVAOZRMDRKB3SNANCNFSM4LG4HLSQ .

harshad5498 avatar Mar 30 '20 11:03 harshad5498

Use this build and you will be able to use it(is from demo). https://rawgit.com/schmich/instascan-builds/master/instascan.min.js

Can please somebody recreate latest release build.

Thanks

Thanks mate, this works

alignwebs avatar Apr 07 '20 09:04 alignwebs

Ok thanks I will try it soon.

On Tue, Apr 7, 2020, 2:53 PM Gulzar Ahmed [email protected] wrote:

Use this build and you will be able to use it(is from demo). https://rawgit.com/schmich/instascan-builds/master/instascan.min.js

Can please somebody recreate latest release build.

Thanks

Thanks mate, this works

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/schmich/instascan/issues/241#issuecomment-610277850, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMEJGLZLULUHYATQOJKYLLRLLWJJANCNFSM4LG4HLSQ .

harshad5498 avatar Apr 07 '20 09:04 harshad5498

Use this build and you will be able to use it(is from demo). https://rawgit.com/schmich/instascan-builds/master/instascan.min.js

Can please somebody recreate latest release build.

Thanks

Funcionó perfecto. Muchas gracias.

Ren14 avatar Jun 11 '20 18:06 Ren14

thanks bro its working fine now

harshad5498 avatar Jun 30 '20 18:06 harshad5498

Just now I am getting the same error, before it was working fine

creenx062512 avatar Aug 31 '22 04:08 creenx062512