Skip to content

Latest commit

 

History

History

electron

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

html5-qrcode with electron


www.electronjs.org | Support Level = Strong

How to build a electronjs app using html5-qrcode

Download the latest library

You can download this from Github release page or npm. And include this in index.html.

<script src="html5-qrcode.min.js"></script>

And include the html placeholder

<div style="width: 600px" id="reader"></div>

And javascript initialization

function onScanSuccess(decodedText, decodedResult) {
    // Handle on success condition with the decoded message.
    console.log(`Scan result ${decodedText}`, decodedResult);
}
var html5QrcodeScanner = new Html5QrcodeScanner(
    "reader", { fps: 10, qrbox: 250 });
html5QrcodeScanner.render(onScanSuccess);

Run the app

npm start