Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result cant show up in console log #281

Open
Bryan-snw opened this issue Nov 16, 2021 · 0 comments
Open

Result cant show up in console log #281

Bryan-snw opened this issue Nov 16, 2021 · 0 comments

Comments

@Bryan-snw
Copy link

so everything work just as fine, but i cant display res result in console log, but it show if i change it to alert, any tips?

<script type="text/javascript"> let scanner = new Instascan.Scanner({ video: document.getElementById('preview') }); scanner.addListener('scan', function (content) { console.log(content); alert(content); }); Instascan.Camera.getCameras().then(function (cameras) { if (cameras.length > 0) { scanner.start(cameras[0]); } else { console.error('No cameras found.'); } }).catch(function (e) { console.error(e); }); </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant