mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 05:31:37 +08:00
Added file-input example & updated static images
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
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="https://raw.githubusercontent.com/serratus/quaggaJS/master/dist/quagga.js?token=ABUVvugjRdStIMzGkd_hFXxHvXL2s9geks5UYn1zwA%3D%3D" type="text/javascript"></script>
|
||||
<script src="file_input.js" type="text/javascript"></script>
|
||||
Reference in New Issue
Block a user