Skip to content

Commit 0fc3e8e

Browse files
committed
Clean up code example to show true one-liner, move license info to note
1 parent 8c579a8 commit 0fc3e8e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

programming/javascript/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ To get started, you can
4747
Add barcode scanning to your website with a single line of code:
4848

4949
```js
50-
// Get a 30-day FREE trial license at: https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js
51-
// new Dynamsoft.BarcodeScanner({license:"YOUR_LICENSE_KEY_HERE"}).launch().then(result=>alert(result.barcodeResults[0].text));
5250
new Dynamsoft.BarcodeScanner().launch().then(result=>alert(result.barcodeResults[0].text));
5351
```
5452

5553
<p align="center">
5654
<a target="_blank" href="https://jsfiddle.net/DynamsoftTeam/gcqjf5r7/" title="Try it on JSFiddle">Try it live on JSFiddle →</a>
5755
</p>
5856

57+
> [!NOTE]
58+
> The above uses a public trial license. For production, [get your own 30-day FREE trial license](https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&package=js) and pass it via `new Dynamsoft.BarcodeScanner({license: "YOUR_LICENSE_KEY"})`.
59+
5960
That's it. The `BarcodeScanner` class handles everything:
6061

6162
- **Camera access** – Automatic device selection, permissions, and video streaming

0 commit comments

Comments
 (0)