Kaynağa Gözat

ajout instascan

Daniel Le Berre 5 yıl önce
ebeveyn
işleme
75bf739a9a

+ 2 - 1
WebContent/index.html

@@ -11,7 +11,8 @@
    </head>
 
    <body>
-
+	  <h1>Scanner</h1>
+	  <a href="instaScan.html">scanner</a>
       <header>
 
          <h1>Fréquentation des éspaces de microfolies</h1>

+ 25 - 0
WebContent/instaScan.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Instascan</title>
+    <script type="text/javascript" src="https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"></script>
+  </head>
+  <body>
+    <video id="preview"></video>
+    <script type="text/javascript">
+      let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
+      scanner.addListener('scan', function (content) {
+        console.log(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>
+  </body>
+</html>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
WebContent/js/instascan.min.js


Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor