mirror of
https://github.com/yugasun/qrcode-decoder.git
synced 2026-08-12 20:27:56 +08:00
feat: update rollup config and demo
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 935 B |
+1
-1
@@ -9,7 +9,7 @@
|
||||
<hr />
|
||||
<video id="video" autoplay></video>
|
||||
|
||||
<script src="../dist/index.aio.js"></script>
|
||||
<script src="./index.aio.js"></script>
|
||||
<script type="text/javascript">
|
||||
function main() {
|
||||
var qr = new QrcodeDecoder();
|
||||
|
||||
+3
-3
@@ -7,8 +7,8 @@
|
||||
<body>
|
||||
<button id="decode">Decode!</button><br>
|
||||
<span id="result"></span><br>
|
||||
<!-- <img src="../test/assets/qrcode.png" alt="qr code" /> -->
|
||||
<script src="../dist/index.aio.js"></script>
|
||||
<!-- <img src="./assets/qrcode.png" alt="qr code" /> -->
|
||||
<script src="./index.aio.js"></script>
|
||||
<script type="module">
|
||||
function main() {
|
||||
var qr = new QrcodeDecoder();
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
btn.onclick = async () => {
|
||||
// you can also decode from image path
|
||||
const code = await qr.decodeFromImage('../test/assets/qrcode.png');
|
||||
const code = await qr.decodeFromImage('./assets/qrcode.png');
|
||||
// const code = qr.decodeFromImage(img);
|
||||
console.log(code);
|
||||
result.innerText = code.data;
|
||||
|
||||
File diff suppressed because one or more lines are too long
+3
-3
@@ -9,9 +9,9 @@
|
||||
<h1>QrcodeDecoder</h1>
|
||||
<h2>Examples</h2>
|
||||
<ul>
|
||||
<li><a href="camera.html">Camera</a></li>
|
||||
<li><a href="image.html">Image</a></li>
|
||||
<li><a href="video.html">Video</a></li>
|
||||
<li><a href="image.html">Image</a></li>
|
||||
<li><a href="video.html">Video</a></li>
|
||||
<li><a href="camera.html">Camera</a></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@
|
||||
<button id="start">Start</button> <button id="stop">Stop</button><br />
|
||||
<span id="result">Click start to scan qrcode.</span><br />
|
||||
|
||||
<video src="../test/assets/qrcode-video.mp4"></video>
|
||||
<video src="./assets/qrcode-video.mp4"></video>
|
||||
|
||||
<script src="../dist/index.aio.js"></script>
|
||||
<script src="./index.aio.js"></script>
|
||||
<script type="text/javascript">
|
||||
function main() {
|
||||
var video = document.querySelector('video');
|
||||
|
||||
Reference in New Issue
Block a user