{"_id":"@alter-ego/instascan-alter","_rev":"5-3151efa798f9771aeb21e153df2e5a43","name":"@alter-ego/instascan-alter","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@alter-ego/instascan-alter","version":"1.0.0","description":"Webcam-driven QR code scanner - Forked from instascan.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"homepage":"https://github.com/alter-eggo/instascan","devDependencies":{"babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-preset-es2015":"^6.9.0","babelify":"^7.3.0","browserify":"^13.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"dependencies":{"babel-polyfill":"^6.9.1","fsm-as-promised":"^0.13.0","visibilityjs":"^1.2.3","webrtc-adapter":"^1.4.0"},"gitHead":"2ce9164bd5ffdecd755d0163e2bae8e6fc104460","_id":"@alter-ego/instascan-alter@1.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-B8gUSn3PWCRsyVdl8/oQ2Ayr/sRFoiP5XG5+4xDANXLuaQuDF5Uhgr5x/P5Vd9pPWF/06yUExFISkmVqCw58Gw==","shasum":"bd19d897fc243f00ee8c2093dcc29ded906fe94a","tarball":"https://registry.npmjs.org/@alter-ego/instascan-alter/-/instascan-alter-1.0.0.tgz","fileCount":7,"unpackedSize":1350982,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3Fb8CRA9TVsSAnZWagAAdF0P/3UvpMoTQu/Z49plbqQc\nqxPTBkEbJHKloyo3b5XW+yUnMBr42kmT1AgI1fCQEo4EcDlbqybTiRj63hEe\nR1XyFuBX3yXPEH1AVRYoZINyiDQY0K59jTeCIX2Rw8paTgI6fntmhL5V19Al\nMZupm6/lcXIVISKY3tSESfUOHvO/84i2DRzSBZV5EhOE7sDgaRoFWgmABn0J\n5bZmBK5Orkkxj1jRI/so8CSumjz2y2C/BaktgJX02QJcS9osrbKB96djF9I7\nfBpfEHhagU21cWi2Y/7xiJMe3k/V5LYpQqPsHkJa9HCsAkAqkC5/IG6kF8ov\nm8G0co0AoMMN7JYMWZ+Y90Wnrz1WbS4MD9t5dFQ+YHNMSXbeAybjK6yoITeh\nXshq7n8QViSuYFY/+AqklFyJx9+dgv/Y/+nVmXrf/shK0iu6vMOAfCClql8D\nfPqsfL5mGzW2dQaXVdR5ARg+y3lz3T3QSPkjOqgK8V4EA6v0aFXYXP/Wp+G4\n4dzbb2Mjknvs3mBUeDtfMOjo3q2T3sl6r+wLHHWPiYfTDTktMl+W8tsaCfdx\nGRFg1akq1zVce51BjdLN/2f6zownAIDGV0q1o8SP41hr0ECybgpHsYU2epsd\nBSCtWeQD3rC9KwmKRCp2SJsr6ul77LldHtFzRjM5AeBZUi8wmU3TqzNmsujZ\n3Rf+\r\n=jVR4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFstGx3LNipPPnq4+65kSDR+fhJWQE/+AqWfYqI2P8c5AiBdR3ZzXb7jHgRd3YGYYCZx+H4Hf4Mv18A3269qMX7mEg=="}]},"_npmUser":{"name":"alter-ego","email":"anastas3993@gmail.com"},"directories":{},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instascan-alter_1.0.0_1608275707955_0.6765172559679469"},"_hasShrinkwrap":false},"1.0.1":{"name":"@alter-ego/instascan-alter","version":"1.0.1","description":"Webcam-driven QR code scanner - Forked from instascan.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"homepage":"https://github.com/alter-eggo/instascan","devDependencies":{"babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-preset-es2015":"^6.9.0","babelify":"^7.3.0","browserify":"^13.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"dependencies":{"babel-polyfill":"^6.9.1","fsm-as-promised":"^0.13.0","visibilityjs":"^1.2.3","webrtc-adapter":"^1.4.0"},"gitHead":"543563eada8df6985ea58c0d419dc30b61cb9701","_id":"@alter-ego/instascan-alter@1.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-MFy/JorRTjg0DnZKx7tGUn91D35lXJsJKkgTJ7ouyUebWxLj1fjtXCqI4u36vc6+VKZhN1IwhoQPngSFJEscKw==","shasum":"7fa5476bea5ebc9315842ecce69bc384846f8a8f","tarball":"https://registry.npmjs.org/@alter-ego/instascan-alter/-/instascan-alter-1.0.1.tgz","fileCount":7,"unpackedSize":1350814,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3eOgCRA9TVsSAnZWagAAzX8QAI2Hw/PHPf/d3CQ1Jucz\nCyUpjiJi71qrqvVucZsOkuTeP4z0GGq3s2CbMV9t5yuelxmkimP7myrKY4CG\nsUrU4MJh7wHxMb/fp523CS36LcNODfD4wUD/qAcybqUmowDK44d/RgsnlTR7\nL8D2mhnSG9BZheKx4Z3OuMT1TsYoEO0N5D207z3RpSK7fqX7pdQdBIkMBtkQ\nXISTfRMG36xItg4iw/yyY8FGPUnJ21LHnAZIor52D81yIkrJlIFcYKrqr+Cv\nBPnnhB8mxvcEG1JPGCBkKSZpU5wxC4Aw7Yzy5C/uj1QXxy5fmUvWNsK8EbQi\n1mb0T5EEfQ8oVbX1o63WyX7UDAIrtUBLybGV98/yhHBBGjAk/WE/we2EQ5hm\nlvCstw8+a3plzN8K8IMJUJr/BgK6tP5H8YndSmJIsvJcmSqy7p2H+UE0NMZT\n2BGDTHismyhP2zvReB3TVe8xf4HNbjd8jUNoKkUsoYizdouskzv/k80R4+4K\nszSR3jjpHWWSL4eDyNZIkJrR6ATVDIevHDO8osXaXNbtB6E0FMN4xJrht4kG\np2DB2mK4KR822a4w/Shy1bxNobV846Sj00lzskWYhlgfa9X8w19byqHJjZeM\nUm1Yy7ByePoYWRubNTiaky2eTDlVP9sPsYuni3yfYvVy2G8xJKWLInjyjeuE\nR7nE\r\n=keZk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgtJpzqXglcVuhjvSMvF6vBE4qtNjiXMv/0IkXzT1ArQIhAJLmNf8a93+tFepQO+PxyoqOFlAbNxnJXoNKA59JbhN5"}]},"_npmUser":{"name":"alter-ego","email":"anastas3993@gmail.com"},"directories":{},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instascan-alter_1.0.1_1608377248238_0.4546255050964596"},"_hasShrinkwrap":false},"1.0.2":{"name":"@alter-ego/instascan-alter","version":"1.0.2","description":"Webcam-driven QR code scanner - Forked from instascan.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"homepage":"https://github.com/alter-eggo/instascan","devDependencies":{"babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-preset-es2015":"^6.9.0","babelify":"^7.3.0","browserify":"^13.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"dependencies":{"babel-polyfill":"^6.9.1","fsm-as-promised":"^0.13.0","visibilityjs":"^1.2.3","webrtc-adapter":"^1.4.0"},"gitHead":"058d8c5d3d27e9ff59079c749b645394ec169038","_id":"@alter-ego/instascan-alter@1.0.2","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZYWepleGqXq1dl4fhO/3ai7c4nxGJQSZFi8UqgfkNaDZ04n8gKBPQgzwnG65lao8SoMi8v3BV5r81eZ+KXcsig==","shasum":"9d96dbe35c8b82e54c7c827f3ef49938a290885e","tarball":"https://registry.npmjs.org/@alter-ego/instascan-alter/-/instascan-alter-1.0.2.tgz","fileCount":7,"unpackedSize":1350815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3eS0CRA9TVsSAnZWagAAfxgQAIPw0pTMuYPcY/hPs+fJ\nEFGPL/aSfN1TkOuOjadpXOlcio99yQLRNZmf7lA4SwXxmcOuBF/CpdUF7T12\nVfJuLsrURghuJC5fNPI2Z4wATosvriXOvvTltJD9VTwBtD8ngQYZqhjOcnwA\nyMqpX/YsZ0dnRQ4w8BrJMwQOaccLKZkTXWSuzoRtzFD3wH/gHoBnloWbULFs\nf9xtWYUWzwRZwxa6Tsa9RJDpnmJjOF9kJHH/SkYe0TEej07U96+BB0H8mF4a\n6wEN7TIodLjRw3INkUFlJ1oK7o95coWnDm8Je3/Vur8/oyF/hd9T924Su3O1\niXlvwXIIp1j2JdRtzVM7qt/he1cy5mwxIDwmw6f8lJESQ85yMT7M3L7ZxxyT\nq6ZEkcO17z/UXbRzdG0oHTpfmRoJ8vpRWS6icEb7vwiC9wDtHDgIx0eINvmb\nzV5OkuWuGEmhexa7CRHclitK9XcZqyq9vPUK1kI9X2vq9dTIUAHbC6cuTiEx\ngUH1dROO88Xb92hbwO6sjpbEw9iRxZDZCvCyGNVuMQF34/zSKWSqwjm38eZb\nyFRZBHcTaS7C2pj4tSIeHzyQ+ac8bHo9a2pREOunJ/BtXdCU/EIxUvYrIgIb\nfB/p+HHD4ymHEJCSkWdczYxKv6GxQZ2cjdXo9iUcphbqKOIcJG/jqK+1BhfS\nV2Wk\r\n=h+XA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjY30DrkIL6nFG+uJFK8ZRmCbmT4vmI1Fj72jER/kYvQIgGIMUQtxPea/4qLCDwNd2PCZhDljPXANygRla732KZIc="}]},"_npmUser":{"name":"alter-ego","email":"anastas3993@gmail.com"},"directories":{},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instascan-alter_1.0.2_1608377523858_0.5659191907870493"},"_hasShrinkwrap":false},"1.0.3":{"name":"@alter-ego/instascan-alter","version":"1.0.3","description":"Webcam-driven QR code scanner - Forked from instascan.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"homepage":"https://github.com/alter-eggo/instascan","devDependencies":{"babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-preset-es2015":"^6.9.0","babelify":"^7.3.0","browserify":"^13.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"dependencies":{"babel-polyfill":"^6.9.1","fsm-as-promised":"^0.13.0","visibilityjs":"^1.2.3","webrtc-adapter":"^1.4.0"},"gitHead":"e7b0d171796cd5ba72fc60a3019c79aa8cc0f6a2","_id":"@alter-ego/instascan-alter@1.0.3","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-58QaijIURN5NRvR+80fhXBYn0e/nSon7ZvL6Seq+4KcltD9kjXxIIHoH/Tmy5JKXIFON+xylnszvjJwPYqpx6A==","shasum":"d61aa44f9513fe0ea2ea029f5eb7c9cb90dd50c5","tarball":"https://registry.npmjs.org/@alter-ego/instascan-alter/-/instascan-alter-1.0.3.tgz","fileCount":7,"unpackedSize":1350767,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3fhQCRA9TVsSAnZWagAA2MsP/08mClaVqpkbyY+jKuNu\n9+hez6/5pb+z/hCQShXu+EwE+x5wrOPAwpQLI2uDpG25sRTpWn8jPipqhyU8\nEWru5322M18wmcXYpIqrVvh+9qmFLUx0Jbxz2rUYBTI4tpnnThm5NxwtVjjU\nfC6b6zORKEMkyOBLj7WwokJ+1nCnhQiIn4bUrN88x/X7IhXpNIdvYfsqbeYj\nWV/SfBGxGKYj/t0VJJBDKUD+kRFzQH3FWQsoiDVGwUplrSxjXkVk7ceNkp3s\nA1p1/G89U6x0etx8E8/XLHM3dYk5uYyRUqC2Q90eO64kG7I5Hikv+2pl9cwH\nlIue/Zf+8xP2vFZxFU+bl8NcA0UAm4AzZrZDgYOSk4omHX3gK1wnNcRc/NrO\nKLXbZuJYpf+8BewIynP7X23e/vN+GEIXQ3aOr4cAXFTllSOosqzu8bkU+xsy\nU+w5h3g/C7d7EfxZ2GbLEf+2xDpk0wMJPT+7TwihQdlzWJqFEfOvD1KQDLaK\nSJqgPoXK/GHUKp5jAlTPZijmiSyGHUu4WoQiT5wOlbEJ0XnH7Ml9dTBBip5q\nST8D0u+Uu3K4Ppithyzfo+KRcCls7NKteum3cTfu3R6QYT2yysRTn4o7wR0n\nziA8TzVyLWgjZvF90ieezxGOX1HFbytmk9NwSRaOWUbIi+Gq/4eGvTc8pj1s\n+yHC\r\n=YCfY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHToEo3Q1ucVqZqpEHWk6V7DHfRlE1m+4K2ZOViKRet8AiA9OVzFXM/zgpf6eZy3HHqZLmDcGO11ApkTyXMoM2z5rQ=="}]},"_npmUser":{"name":"alter-ego","email":"anastas3993@gmail.com"},"directories":{},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instascan-alter_1.0.3_1608382543939_0.12803380491934013"},"_hasShrinkwrap":false},"1.0.4":{"name":"@alter-ego/instascan-alter","version":"1.0.4","description":"Webcam-driven QR code scanner - Forked from instascan.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"homepage":"https://github.com/alter-eggo/instascan","devDependencies":{"babel-plugin-syntax-async-functions":"^6.8.0","babel-plugin-transform-regenerator":"^6.9.0","babel-preset-es2015":"^6.9.0","babelify":"^7.3.0","browserify":"^13.0.1","gulp":"^3.9.1","gulp-rename":"^1.2.2","gulp-uglify":"^1.5.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"dependencies":{"babel-polyfill":"^6.9.1","fsm-as-promised":"^0.13.0","visibilityjs":"^1.2.3","webrtc-adapter":"^1.4.0"},"gitHead":"69326db9b113bd5d238dfba80516cfedf7026b10","_id":"@alter-ego/instascan-alter@1.0.4","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Vmz/AislgXTZRmcGuHrYWbYcs2FICpZyqYAu8zeHvlMOMoIQkH2bJajmhqFVvnJ+KbKkp6fNjmd4ispUQx7upg==","shasum":"58d29356172663ad9188575681fa3331d5a4949d","tarball":"https://registry.npmjs.org/@alter-ego/instascan-alter/-/instascan-alter-1.0.4.tgz","fileCount":7,"unpackedSize":1350815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3fv7CRA9TVsSAnZWagAAsd8P+wZiFNH77BJ44BN/VhCj\nfm3P2KxHTAqmZWlghqASnL+k0Gjc1Rbwb01DAH7rPwoXiq1Cv6Te81qDTEDu\n+3j6lgKlr+1PCowpVpe7y0AhNirv1s3Q74ApHs0Og1xpi/l5TDeRX0E0Uhaz\nvH4qB4VddKA3Ve9hXJdkPrpbQpuMWePr2fJm5w9bo/L+kP/oNRVvaY8IbxUN\nT5oD8CYz1p9k8M5tbGXSno6cr0QE+mi8fKoXHZbyynfaojLioQye8xtAhCt5\nB1NyAvvaAdDyybi9hJ846iU5j0y+1J+nGNOvvoiwVT+hFsbNu2fLao59tlw5\n6vgXoLMSqqm0axdktkDJSFyELRhkKNNbBprOfvKiaVaXNj3qzk3jN3ziF8BB\nnLYkrSGvbkq12inQlZ5krKRX3bZdjg8PFOW9xJdVP6xuny6val1L2ZzCnNU7\nZ0v3w/uhUbcFye7DwegqKxBiaboOa0Pq+fBuxYgtEf62wWe9eXvtcTYtD7hM\nmzIzCF2ziao68ptY8j4WYBfGsWpdfRtRbITFWgV+6lhBFIRk0uD1Qt5I7A3u\nLZhLsxKkCp3TzzG9UoWfbCy8doyabYbw4NoxKmhmAdBDBe1OBLv5KDl3/m0i\nC7FpNFmZzAJaQQc2KNBNq1s5GO+FxKx5LWLFJkTJc0MfvFso4jI+2YKvkNa9\nd3QI\r\n=nJ+K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLHJj87qDZtWzmcKvfXBR71ssqefXlU+5bziZF+DKS8QIgFTAHmrPgddL+VIQtOkA9Kwu9Lw+t9x+cBuIYTBHENO0="}]},"_npmUser":{"name":"alter-ego","email":"anastas3993@gmail.com"},"directories":{},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/instascan-alter_1.0.4_1608383483171_0.281911652581992"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-18T07:15:07.918Z","1.0.0":"2020-12-18T07:15:08.138Z","modified":"2022-04-04T13:39:49.894Z","1.0.1":"2020-12-19T11:27:28.489Z","1.0.2":"2020-12-19T11:32:04.040Z","1.0.3":"2020-12-19T12:55:44.133Z","1.0.4":"2020-12-19T13:11:23.463Z"},"maintainers":[{"name":"alter-ego","email":"anastas3993@gmail.com"}],"description":"Webcam-driven QR code scanner - Forked from instascan.","homepage":"https://github.com/alter-eggo/instascan","keywords":["qr","code","quick","response","scan","scanner","webcam","realtime"],"repository":{"type":"git","url":"git+https://github.com/alter-eggo/instascan.git"},"author":{"name":"Anastas Alexanov","email":"anastas3993@gmail.com"},"bugs":{"url":"https://github.com/alter-eggo/instascan/issues"},"license":"MIT","readme":"# ![Instascan](https://raw.githubusercontent.com/schmich/instascan/master/assets/qr.png) Instascan\nReal-time webcam-driven HTML5 QR code scanner. [Try the live demo](https://schmich.github.io/instascan/).\n\n## Installing\n\n*Note:* Chrome requires HTTPS when using the WebRTC API. Any pages using this library should be served over HTTPS.\n\n### NPM\n\n`npm install --save instascan`\n\n```javascript\nconst Instascan = require('instascan');\n```\n\n### Bower\n\nPending. [Drop a note](https://github.com/schmich/instascan/issues/31) if you need Bower support.\n\n### Minified\n\nCopy `instascan.min.js` from the [releases](https://github.com/schmich/instascan/releases) page and load with:\n\n```html\n<script type=\"text/javascript\" src=\"instascan.min.js\"></script>\n```\n\n## Example\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Instascan</title>\n    <script type=\"text/javascript\" src=\"instascan.min.js\"></script>\n  </head>\n  <body>\n    <video id=\"preview\"></video>\n    <script type=\"text/javascript\">\n      let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });\n      scanner.addListener('scan', function (content) {\n        console.log(content);\n      });\n      Instascan.Camera.getCameras().then(function (cameras) {\n        if (cameras.length > 0) {\n          scanner.start(cameras[0]);\n        } else {\n          console.error('No cameras found.');\n        }\n      }).catch(function (e) {\n        console.error(e);\n      });\n    </script>\n  </body>\n</html>\n```\n\n## API\n\n### let scanner = new Instascan.Scanner(opts)\n\nCreate a new scanner with options:\n\n```javascript\nlet opts = {\n  // Whether to scan continuously for QR codes. If false, use scanner.scan() to manually scan.\n  // If true, the scanner emits the \"scan\" event when a QR code is scanned. Default true.\n  continuous: true,\n  \n  // The HTML element to use for the camera's video preview. Must be a <video> element.\n  // When the camera is active, this element will have the \"active\" CSS class, otherwise,\n  // it will have the \"inactive\" class. By default, an invisible element will be created to\n  // host the video.\n  video: document.getElementById('preview'),\n  \n  // Whether to horizontally mirror the video preview. This is helpful when trying to\n  // scan a QR code with a user-facing camera. Default true.\n  mirror: true,\n  \n  // Whether to include the scanned image data as part of the scan result. See the \"scan\" event\n  // for image format details. Default false.\n  captureImage: false,\n  \n  // Only applies to continuous mode. Whether to actively scan when the tab is not active.\n  // When false, this reduces CPU usage when the tab is not active. Default true.\n  backgroundScan: true,\n  \n  // Only applies to continuous mode. The period, in milliseconds, before the same QR code\n  // will be recognized in succession. Default 5000 (5 seconds).\n  refractoryPeriod: 5000,\n  \n  // Only applies to continuous mode. The period, in rendered frames, between scans. A lower scan period\n  // increases CPU usage but makes scan response faster. Default 1 (i.e. analyze every frame).\n  scanPeriod: 1\n};\n```\n\n### scanner.start(camera)\n\n- Activate `camera` and start scanning using it as the source. Returns promise.\n- This must be called in order to use [`scanner.scan`](#let-result--scannerscan) or receive [`scan`](#scanneraddlistenerscan-callback) events.\n- `camera`: Instance of `Instascan.Camera` from [`Instascan.Camera.getCameras`](#instascancameragetcameras).\n- `.then(function () { ... })`: called when camera is active and scanning has started.\n- `.catch(function (err) { ... })`\n  - Called when an error occurs trying to initialize the camera for scanning.\n  - `err`: An `Instascan.MediaError` in the case of a known `getUserMedia` failure ([see error types](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Errors)).\n  \n### scanner.stop()\n\n- Stop scanning and deactivate the camera. Returns promise.\n- `.then(function () { ... })`: called when camera and scanning have stopped.\n\n### let result = scanner.scan()\n\n- Scan video immediately for a QR code.\n- QR codes recognized with this method are not emitted via the `scan` event.\n- If no QR code is detected, `result` is `null`.\n- `result.content`: Scanned content decoded from the QR code.\n- `result.image`: Undefined if [`scanner.captureImage`](#let-scanner--new-instascanscanneropts) is `false`, otherwise, see the [`scan`](#scanneraddlistenerscan-callback) event for format.\n\n### scanner.addListener('scan', callback)\n\n- Emitted when a QR code is scanned using the camera in continuous mode (see [`scanner.continuous`](#let-scanner--new-instascanscanneropts)).\n- `callback`: `function (content, image)`\n  - `content`: Scanned content decoded from the QR code.\n  - `image`: `null` if [`scanner.captureImage`](#let-scanner--new-instascanscanneropts) is `false`, otherwise, a base64-encoded [WebP](https://en.wikipedia.org/wiki/WebP)-compressed data URI of the camera frame used to decode the QR code.\n\n### scanner.addListener('active', callback)\n\n- Emitted when the scanner becomes active as the result of [`scanner.start`](#scannerstartcamera) or the tab gaining focus.\n- If `opts.video` element was specified, it will have the `active` CSS class.\n- `callback`: `function ()`\n\n### scanner.addListener('inactive', callback)\n\n- Emitted when the scanner becomes inactive as the result of [`scanner.stop`](#scannerstop) or the tab losing focus.\n- If `opts.video` element was specified, it will have the `inactive` CSS class.\n- `callback`: `function ()`\n\n### Instascan.Camera.getCameras()\n\n- Enumerate available video devices. Returns promise.\n- `.then(function (cameras) { ... })`\n  - Called when cameras are available.\n  - `cameras`: Array of `Instascan.Camera` instances available for use.\n- `.catch(function (err) { ... })`\n  - Called when an error occurs while getting cameras.\n  - `err`: An `Instascan.MediaError` in the case of a known `getUserMedia` failure ([see error types](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Errors)).\n\n### camera.id\n\n- Unique camera ID provided by the browser.\n- These IDs are stable and can be persisted across instances of your application (e.g. in localStorage).\n\n### camera.name\n\n- Camera name, including manufacturer and model\n- e.g. \"Microsoft LifeCam HD-3000\".\n\n## Compatibility\n\nInstascan works on non-iOS platforms in [any browser that supports the WebRTC/getUserMedia API](http://caniuse.com/#feat=stream), which currently includes Chome, Firefox, Opera, and Edge. IE and Safari are not supported.\n\nInstascan does not work on iOS since Apple does not yet support WebRTC in WebKit *and* forces other browser vendors (Chrome, Firefox, Opera) to use their implementation of WebKit. [Apple is actively working on WebRTC support in WebKit](https://bugs.webkit.org/show_bug.cgi?id=124288).\n\n## Performance\n\nMany factors affect how quickly and reliably Instascan can detect QR codes.\n\nIf you control creation of the QR code, consider the following:\n\n- A larger physical code is better. A 2\" square code is better than a 1\" square code.\n- Flat, smooth, matte surfaces are better than curved, rough, glossy surfaces.\n- Include a sufficient quiet zone, the white border surrounding QR code. The quiet zone should be at least four times the width of an individual element in your QR code.\n- A simpler code is better. You can use [this QR code generator](https://www.the-qrcode-generator.com/) to see how your input affects complexity.\n- For the same length, numeric content is simpler than ASCII content, which is simpler than Unicode content.\n- Shorter content is simpler. If you're encoding a URL, consider using a shortener such as [goo.gl](https://goo.gl/) or [bit.ly](https://bitly.com/).\n\nWhen scanning, consider the following:\n\n- QR code orientation doesn't matter.\n- Higher resolution video is better, but is more CPU intensive.\n- Direct, orthogonal scanning is better than scanning at an angle.\n- Blurry video greatly reduces scanner performance.\n- Auto-focus can cause lags in detection as the camera adjusts focus. Consider disabling it or using a fixed-focus camera with the subject positioned at the focal point.\n- Exposure adjustment on cameras can cause lags in detection. Consider disabling it or having a fixed white backdrop.\n\n## Example Setup\n\n- Purpose: To scan QR code stickers on paper cards and plastic bags.\n- Camera: [Microsoft LifeCam HD-3000](http://www.newegg.com/Product/Product.aspx?Item=9SIA4RE40S4991), 720p, fixed focus, around $30 USD.\n- Small support to ensure camera is focused on subject.\n- White paper backdrop to mitigate exposure adjustment.\n\n![Setup](https://raw.githubusercontent.com/schmich/instascan/master/assets/setup.jpg)\n\n## Credits\n\nPowered by the [Emscripten JavaScript build](https://github.com/kig/zxing-cpp-emscripten) of the [C++ port](https://github.com/glassechidna/zxing-cpp) of the [ZXing Java library](https://github.com/zxing/zxing).\n\n## License\n\nCopyright &copy; 2016 Chris Schmich  \nMIT License. See [LICENSE](LICENSE) for details.\n","readmeFilename":"README.md"}