instascan icon indicating copy to clipboard operation
instascan copied to clipboard

Add bower as a packaging option

Open schmich opened this issue 7 years ago • 14 comments

  • Publish as a Bower package
  • https://bower.io/docs/creating-packages/

schmich avatar Jul 18 '16 20:07 schmich

This would be super helpful!

bjoberg avatar Aug 07 '17 18:08 bjoberg

Any reason why this needs to be on the 2.0.0 milestone? This is relatively easy to accomplish.

bchr02 avatar Sep 24 '17 20:09 bchr02

Is there any indication on when this is planned?

Elliffe avatar Nov 27 '17 10:11 Elliffe

Hi. I set up the code in order to use by default the smartphone back camera but it keeps mirroring the QR code. could you please tell me if I am doing anything wrong... ? this is my script:

 <script type="text/javascript">
      let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
      scanner.addListener('scan', function (content) {
        console.log(content);
        $("#QRLink").text(content);
        $("#QRLink").attr("href",content);
      });
      let opts = {
        backgroundScan: false,
        mirror: false
      };
      
      Instascan.Camera.getCameras().then(function (cameras) {
        if (cameras.length > 0) {
          scanner.start(cameras[1]);
        } else {
          console.error('No cameras found.');
        }
      }).catch(function (e) {
        console.error(e);
      });
    </script>

I already tried mirror : false and mirror : true but none is working.

Thank in advance,

PS The https://schmich.github.io/instascan/ camera does not work in Windows phone either,

labregowski avatar Dec 22 '17 23:12 labregowski

It would be amazing to have bower support! :)

mikealche avatar Jan 24 '18 21:01 mikealche

Is there a way to have a CND for binding it?

ghost avatar Feb 07 '18 15:02 ghost

while not ideal, this worked for me bower install --save https://github.com/schmich/instascan/releases/download/1.0.0/instascan.min.js . Will install to bower_components/instascan.min/index.js

Virith avatar Feb 21 '18 02:02 Virith

+1

princenaman avatar Feb 14 '19 06:02 princenaman

Hello, how can I use it in my ionic 4 project ? Thanks in advance

I am also trying to integrate into an Ionic project, but when I build I am getting an error in the zxing.js file:

Module not found: Error: can't resolve 'fs' in .../instascan/src.

Is anybody else seeing this error or found a way around it. Thanks.

iowagrade avatar Mar 08 '20 15:03 iowagrade

Hi. I set up the code in order to use by default the smartphone back camera but it keeps mirroring the QR code. could you please tell me if I am doing anything wrong... ? this is my script:

 <script type="text/javascript">
      let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
      scanner.addListener('scan', function (content) {
        console.log(content);
        $("#QRLink").text(content);
        $("#QRLink").attr("href",content);
      });
      let opts = {
        backgroundScan: false,
        mirror: false
      };
      
      Instascan.Camera.getCameras().then(function (cameras) {
        if (cameras.length > 0) {
          scanner.start(cameras[1]);
        } else {
          console.error('No cameras found.');
        }
      }).catch(function (e) {
        console.error(e);
      });
    </script>

I already tried mirror : false and mirror : true but none is working.

Thank in advance,

PS The https://schmich.github.io/instascan/ camera does not work in Windows phone either,

try this:

let opts = { video: document.getElementById('preview'), backgroundScan: false, mirror: false }; let scanner = new Instascan.Scanner(opts);

AbduDevPre avatar May 14 '20 09:05 AbduDevPre

Module name "instascan" has not been loaded yet for context: _. Use require([]) error faced.

ronakiihglobal avatar Jun 30 '21 10:06 ronakiihglobal

Where can I find the file instascan.min.js I can't see it anywhere in the package

Dvdben avatar Aug 28 '21 08:08 Dvdben

Hi could you perhaps upload a code with a start and stop button for the webcam? Unfortunately, to use only scanner.stop() in a new function does not work for me :-(

thanks a lot.

SmoothiniGitHub avatar Jan 13 '22 06:01 SmoothiniGitHub