Skip to content

Commit 550dbab

Browse files
committed
update electron sample to adapt DBR JS 9.0.0
1 parent bedfb80 commit 550dbab

4 files changed

Lines changed: 7 additions & 5 deletions

File tree

1.hello-world/9.read-video-electron/action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ document.getElementById('readBarcode').onclick = async () => {
2222
console.log(results);
2323
}
2424
};
25-
scanner.onUnduplicatedRead = (txt, result) => {
25+
scanner.onUniqueRead = (txt, result) => {
2626
alert(txt, result);
2727
};
2828
document.getElementById("barcodeScannerUI").appendChild(scanner.getUIElement());

1.hello-world/9.read-video-electron/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ <h1 style="font-size: 1.5em;">Hello World for Electron</h1>
1515
<div class="container">
1616
<div id="barcodeScannerUI"></div>
1717
</div>
18-
<script src="./node_modules/dynamsoft-javascript-barcode/dist/dbr.js"></script>
18+
<!-- <script src="./node_modules/dynamsoft-javascript-barcode/dist/dbr.js"></script> -->
19+
<script src="./node_modules/keillion-dynamsoft-javascript-barcode/dist/dbr.js"></script>
1920
<script src="action.js"></script>
2021
</body>
2122

1.hello-world/9.read-video-electron/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
},
1010
"author": "tom@dynamsoft.com",
1111
"dependencies": {
12+
"dynamsoft-javascript-barcode": "8.8.7",
1213
"electron": "14.0.1",
13-
"dynamsoft-javascript-barcode": "8.8.7"
14+
"keillion-dynamsoft-javascript-barcode": "0.20220318174621.0"
1415
}
15-
}
16+
}

1.hello-world/9.read-video-electron/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ body {
1111
margin: 2vmin auto;
1212
text-align: center;
1313
font-size: medium;
14-
height: 40vh;
14+
height: 60vh;
1515
width: 80vw;
1616
}

0 commit comments

Comments
 (0)