You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
quaggaJS/examples/file_input.html

30 lines
1.3 KiB
HTML

---
layout: examples
title: Demo with file-input
showInMenu: false
---
<section id="container" class="container">
<h3>Working with file-input</h3>
<p>This example let's you select an image from your local filesystem. QuaggaJS then tries to decode the barcode using
the preferred method (<strong>Code128</strong> or <strong>EAN</strong>). There is no server interaction needed as the
file is simply accessed through the <a href="http://www.w3.org/TR/file-upload/">File API</a>.</p>
<p>This also works great on a wide range of mobile-phones where the camera access through <code>getUserMedia</code> is still very limited.</p>
<div class="controls">
<input type="file" capture/>
<fieldset class="reader-group">
<label>Code128</label>
<input type="radio" name="reader" value="code_128" checked />
<label>EAN</label>
<input type="radio" name="reader" value="ean" />
</fieldset>
</div>
<div id="result_strip">
<ul class="thumbnails"></ul>
</div>
<div id="interactive" class="viewport"></div>
</section>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://raw.githubusercontent.com/serratus/quaggaJS/master/dist/quagga.js" type="text/javascript"></script>
<script src="file_input.js" type="text/javascript"></script>