how can i use it for scan normal barcode not qr
See original GitHub issuehi i have this code `<html lang="en">
<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>HTML5 QR Code with Vue js</title> <link rel="stylesheet" href="style.css"> </head> <body> <div id="app"> <div class="header" style="margin-bottom: 20px;">{{ header }}</div> <div class="section" style="width: 500px; margin: auto;"> <qrcode-scanner v-bind:qrbox="250" v-bind:fps="10" style="width: 500px;"> </qrcode-scanner> </div>
<div class="footer" style="margin-bottom: 20px;">{{ result }}</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/html5-qrcode"></script>
<script>
Vue.component('qrcode-scanner', {
props: {
qrbox: Number,
fps: Number,
},
template: `<div id="qr-code-full-region"></div>`,
mounted: function () {
var $this = this;
var config = { fps: this.fps ? this.fps : 10 };
if (this.qrbox) {
config['qrbox'] = this.qrbox;
}
function onScanSuccess(decodedText, decodedResult) {
$this.$root.$emit('decodedCode', decodedText, decodedResult);
}
var html5QrcodeScanner = new Html5QrcodeScanner(
"qr-code-full-region", config);
html5QrcodeScanner.render(onScanSuccess);
}
});
var app = new Vue({
el: '#app',
data: {
header: 'Html5-qrcode using vue.js',
result: ''
},
created: function () {
this.$root.$on('decodedCode', function (decodedText, decodedResult) {
alert(decodedText);
this.decodedText = decodedText;
}.bind(this));
}
});
</script>
</body>
</html>
`
its working great but only with qr how can i change the type for ean 13 or anything else thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How to scan a QR code on your Android (no apps required)
Use your Android's camera app · Open your camera app, point it at a QR code and hold steady for a few seconds....
Read more >9 reasons Why Your QR Code is Not Working - Beaconstac blog
If the QR Code is still not working, try scanning it via an external QR Code scanner or update your operating system to...
Read more >How to Scan Barcodes With an Android Phone Using Barcode ...
1. Open the Play Store on your device. You can find the Play Store in your list of apps. The icon looks like...
Read more >How to scan a QR code with your iPhone or Android phone
Your Android phone's camera likely can scan QR codes without the use of a third-party app. Here's how: ... Open the Camera app...
Read more >Guide to Barcodes vs. QR Codes: Analysis and Comparison
QR codes may be considered easier to scan compared to 1D barcodes, as they can be scanned in any direction, whereas 1D barcodes...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Usually the library scans all codes, you can limit it to certain code types. Make sure your scanning div is not too small.
Have you tried demo app yet? https://scanapp.org/#reader It scans barcodes without any issues.