dynamsoft-barcode-reader-bundle 10.4.3100 → 10.5.1000-iv-singlewasm

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dynamsoft-barcode-reader@10.4.31/dist/DBR-PresetTemplates.json +628 -0
  2. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.d.ts +383 -0
  3. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.esm.js +11 -0
  4. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.js +11 -0
  5. package/dynamsoft-barcode-reader@10.4.31/dist/dbr.mjs +11 -0
  6. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.d.ts +1877 -0
  7. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.esm.js +11 -0
  8. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.js +11 -0
  9. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.mjs +11 -0
  10. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.mobile-native.ui.html +222 -0
  11. package/dynamsoft-camera-enhancer@4.1.1/dist/dce.ui.html +115 -0
  12. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.d.ts +663 -0
  13. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.esm.js +2121 -0
  14. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.js +11 -0
  15. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.mjs +2121 -0
  16. package/dynamsoft-capture-vision-router@2.4.33/dist/cvr.worker.js +21 -0
  17. package/dynamsoft-capture-vision-std@1.4.21/dist/std.js +1 -0
  18. package/dynamsoft-capture-vision-std@1.4.21/dist/std.wasm +0 -0
  19. package/dynamsoft-code-parser@2.4.32/dist/dcp.d.ts +90 -0
  20. package/dynamsoft-code-parser@2.4.32/dist/dcp.esm.js +11 -0
  21. package/dynamsoft-code-parser@2.4.32/dist/dcp.js +11 -0
  22. package/dynamsoft-code-parser@2.4.32/dist/dcp.worker.js +21 -0
  23. package/dynamsoft-code-parser@2.4.32/dist/specification/AADHAAR.data +0 -0
  24. package/dynamsoft-code-parser@2.4.32/dist/specification/AADHAAR_Map.txt +3 -0
  25. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_DL_ID.data +0 -0
  26. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_DL_ID_WITH_MAG_STRIPE.data +0 -0
  27. package/dynamsoft-code-parser@2.4.32/dist/specification/AAMVA_Map.txt +70 -0
  28. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_Map.txt +255 -0
  29. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD1_ID.data +0 -0
  30. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_FRENCH_ID.data +0 -0
  31. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_ID.data +0 -0
  32. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD2_VISA.data +0 -0
  33. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD3_PASSPORT.data +0 -0
  34. package/dynamsoft-code-parser@2.4.32/dist/specification/MRTD_TD3_VISA.data +0 -0
  35. package/dynamsoft-code-parser@2.4.32/dist/specification/SOUTH_AFRICA_DL.data +0 -0
  36. package/dynamsoft-code-parser@2.4.32/dist/specification/SouthAfricaDL_Map.txt +3 -0
  37. package/dynamsoft-code-parser@2.4.32/dist/specification/VIN.data +0 -0
  38. package/dynamsoft-code-parser@2.4.32/dist/specification/VIN_Map.txt +150 -0
  39. package/dynamsoft-core@3.4.31/dist/core.d.ts +1019 -0
  40. package/dynamsoft-core@3.4.31/dist/core.esm.js +11 -0
  41. package/dynamsoft-core@3.4.31/dist/core.js +11 -0
  42. package/dynamsoft-core@3.4.31/dist/core.mjs +11 -0
  43. package/dynamsoft-core@3.4.31/dist/core.worker.js +11 -0
  44. package/dynamsoft-license@3.4.31/dist/dls.license.dialog.html +20 -0
  45. package/dynamsoft-license@3.4.31/dist/license.d.ts +40 -0
  46. package/dynamsoft-license@3.4.31/dist/license.esm.js +11 -0
  47. package/dynamsoft-license@3.4.31/dist/license.js +11 -0
  48. package/dynamsoft-license@3.4.31/dist/license.mjs +11 -0
  49. package/dynamsoft-license@3.4.31/dist/license.worker.js +11 -0
  50. package/dynamsoft-utility@1.4.32/dist/utility.d.ts +118 -0
  51. package/dynamsoft-utility@1.4.32/dist/utility.esm.js +11 -0
  52. package/dynamsoft-utility@1.4.32/dist/utility.js +11 -0
  53. package/dynamsoft-utility@1.4.32/dist/utility.mjs +11 -0
  54. package/dynamsoft-utility@1.4.32/dist/utility.worker.js +11 -0
  55. package/package.json +9 -82
  56. package/API Reference.url +0 -2
  57. package/LEGAL.txt +0 -353
  58. package/LICENSE +0 -4
  59. package/README.html +0 -836
  60. package/README.md +0 -735
  61. package/samples.url +0 -2
  62. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.d.ts +0 -0
  63. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.esm.d.ts +0 -0
  64. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.js +0 -0
  65. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.bundle.mjs +0 -0
  66. /package/{dist → dynamsoft-barcode-reader-bundle@10.4.3100/dist}/dbr.no-content-bundle.esm.js +0 -0
package/README.html DELETED
@@ -1,836 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Dynamsoft Barcode Reader for Your Website - User Guide</title>
4
- <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <meta charset="UTF-8">
6
- <style type='text/css'>
7
- body {
8
- font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
9
- color: #111;
10
- background-color: #fbfbfb;
11
- -webkit-text-size-adjust: 100%;
12
- -webkit-font-feature-settings: "kern" 1;
13
- -moz-font-feature-settings: "kern" 1;
14
- -o-font-feature-settings: "kern" 1;
15
- font-feature-settings: "kern" 1;
16
- font-kerning: normal;
17
- padding: 30px;
18
- }
19
-
20
- @media only screen and (max-width: 600px) {
21
- body {
22
- padding: 5px;
23
- }
24
- body>#content {
25
- padding: 0px 20px 20px 20px !important;
26
- }
27
- }
28
-
29
- body>#content {
30
- margin: 0px;
31
- max-width: 900px;
32
- border: 1px solid #e1e4e8;
33
- padding: 10px 40px;
34
- padding-bottom: 20px;
35
- border-radius: 2px;
36
- margin-left: auto;
37
- margin-right: auto;
38
- }
39
-
40
- hr {
41
- color: #bbb;
42
- background-color: #bbb;
43
- height: 1px;
44
- flex: 0 1 auto;
45
- margin: 1em 0;
46
- padding: 0;
47
- border: none;
48
- }
49
-
50
-
51
- /**
52
- * Links
53
- */
54
-
55
- a {
56
- color: #0366d6;
57
- text-decoration: none;
58
- }
59
-
60
- a:visited {
61
- color: #0366d6;
62
- }
63
-
64
- a:hover {
65
- color: #0366d6;
66
- text-decoration: underline;
67
- }
68
-
69
- pre {
70
- background-color: #f6f8fa;
71
- border-radius: 3px;
72
- font-size: 85%;
73
- line-height: 1.45;
74
- overflow: auto;
75
- padding: 16px;
76
- }
77
-
78
-
79
- /**
80
- * Code blocks
81
- */
82
-
83
- code {
84
- background-color: rgba(27, 31, 35, .05);
85
- border-radius: 3px;
86
- font-size: 85%;
87
- margin: 0;
88
- word-wrap: break-word;
89
- padding: .2em .4em;
90
- font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
91
- }
92
-
93
- pre>code {
94
- background-color: transparent;
95
- border: 0;
96
- display: inline;
97
- line-height: inherit;
98
- margin: 0;
99
- overflow: visible;
100
- padding: 0;
101
- word-wrap: normal;
102
- font-size: 100%;
103
- }
104
-
105
-
106
- /**
107
- * Blockquotes
108
- */
109
-
110
- blockquote {
111
- margin-left: 30px;
112
- margin-top: 0px;
113
- margin-bottom: 16px;
114
- border-left-width: 3px;
115
- padding: 0 1em;
116
- color: #828282;
117
- border-left: 4px solid #e8e8e8;
118
- padding-left: 15px;
119
- font-size: 18px;
120
- letter-spacing: -1px;
121
- font-style: italic;
122
- }
123
-
124
- blockquote * {
125
- font-style: normal !important;
126
- letter-spacing: 0;
127
- color: #6a737d !important;
128
- }
129
-
130
-
131
- /**
132
- * Tables
133
- */
134
-
135
- table {
136
- border-spacing: 2px;
137
- display: block;
138
- font-size: 14px;
139
- overflow: auto;
140
- width: 100%;
141
- margin-bottom: 16px;
142
- border-spacing: 0;
143
- border-collapse: collapse;
144
- }
145
-
146
- td {
147
- padding: 6px 13px;
148
- border: 1px solid #dfe2e5;
149
- }
150
-
151
- th {
152
- font-weight: 600;
153
- padding: 6px 13px;
154
- border: 1px solid #dfe2e5;
155
- }
156
-
157
- tr {
158
- background-color: #fff;
159
- border-top: 1px solid #c6cbd1;
160
- }
161
-
162
- table tr:nth-child(2n) {
163
- background-color: #f6f8fa;
164
- }
165
-
166
-
167
- /**
168
- * Others
169
- */
170
-
171
- img {
172
- max-width: 100%;
173
- }
174
-
175
- p {
176
- line-height: 24px;
177
- font-weight: 400;
178
- font-size: 16px;
179
- color: #24292e;
180
- }
181
-
182
- ul {
183
- margin-top: 0;
184
- }
185
-
186
- li {
187
- color: #24292e;
188
- font-size: 16px;
189
- font-weight: 400;
190
- line-height: 1.5;
191
- }
192
-
193
- li+li {
194
- margin-top: 0.25em;
195
- }
196
-
197
- * {
198
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
199
- color: #24292e;
200
- }
201
-
202
- a:visited {
203
- color: #0366d6;
204
- }
205
-
206
- h1,
207
- h2,
208
- h3 {
209
- border-bottom: 1px solid #eaecef;
210
- color: #111;
211
- /* Darker */
212
- }
213
-
214
- code>* {
215
- font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
216
- }
217
- </style>
218
- <style type='text/css'>pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}</style>
219
- </head>
220
- <body>
221
- <div id='content'>
222
- <h1 id="barcode-reader-for-your-website---user-guide">Barcode Reader for Your Website - User Guide</h1>
223
- <p><a href="https://www.dynamsoft.com/barcode-reader/sdk-javascript/">Dynamsoft Barcode Reader JavaScript Edition</a> (DBR-JS) is equipped with industry-leading algorithms for exceptional speed, accuracy and read rates in barcode reading. Using its well-designed API, you can turn your web page into a barcode scanner with just a few lines of code.</p>
224
- <p><img src="https://img.shields.io/npm/v/dynamsoft-barcode-reader.svg" alt="version" /><br />
225
- <img src="https://img.shields.io/npm/dm/dynamsoft-barcode-reader.svg" alt="downloads" /><br />
226
- <img src="https://img.shields.io/jsdelivr/npm/hm/dynamsoft-barcode-reader.svg" alt="jsdelivr" /></p>
227
- <p><img src="https://img.shields.io/npm/v/dynamsoft-javascript-barcode.svg" alt="version" /><br />
228
- <img src="https://img.shields.io/npm/dm/dynamsoft-javascript-barcode.svg" alt="downloads" /><br />
229
- <img src="https://img.shields.io/jsdelivr/npm/hm/dynamsoft-javascript-barcode.svg" alt="jsdelivr" /></p>
230
- <p>Once the DBR-JS SDK gets integrated into your web page, your users can access a camera via the browser and read barcodes directly from its video input.</p>
231
- <p>In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website.</p>
232
- <p><span style="font-size:20px">Table of Contents</span></p>
233
- <ul>
234
- <li><a href="#barcode-reader-for-your-website---user-guide">Barcode Reader for Your Website - User Guide</a></li>
235
- <li><a href="#hello-world---simplest-implementation">Hello World - Simplest Implementation</a><ul>
236
- <li><a href="#understand-the-code">Understand the code</a></li>
237
- <li><a href="#about-the-code">About the code</a></li>
238
- <li><a href="#run-the-example">Run the example</a></li></ul></li>
239
- <li><a href="#preparing-the-sdk">Preparing the SDK</a><ul>
240
- <li><a href="#step-1-include-the-sdk">Step 1: Include the SDK</a></li>
241
- <li><a href="#option-1-use-a-public-cdn">Option 1: Use a public CDN</a></li>
242
- <li><a href="#option-2-host-the-sdk-yourself-optional">Option 2: Host the SDK yourself (optional)</a></li>
243
- <li><a href="#step-2-prepare-the-sdk">Step 2: Prepare the SDK</a></li>
244
- <li><a href="#1-specify-the-license">1. Specify the license</a></li>
245
- <li><a href="#2-optional-specify-the-location-of-the-engine-files">2. [Optional] Specify the location of the "engine" files</a></li></ul></li>
246
- <li><a href="#using-the-sdk">Using the SDK</a><ul>
247
- <li><a href="#step-1-preload-the-module">Step 1: Preload the module</a></li>
248
- <li><a href="#step-2-create-a-capturevisionrouter-object">Step 2: Create a CaptureVisionRouter object</a></li>
249
- <li><a href="#step-3-connect-an-image-source">Step 3: Connect an image source</a></li>
250
- <li><a href="#step-4-register-a-result-receiver">Step 4: Register a result receiver</a></li>
251
- <li><a href="#step-5-start-process-video-frames">Step 5: Start process video frames</a></li></ul></li>
252
- <li><a href="#customizing-the-process">Customizing the process</a><ul>
253
- <li><a href="#1-adjust-the-preset-template-settings">1. Adjust the preset template settings</a></li>
254
- <li><a href="#11-change-barcode-settings">1.1. Change barcode settings</a></li>
255
- <li><a href="#12-retrieve-the-original-image">1.2. Retrieve the original image</a></li>
256
- <li><a href="#13-change-reading-frequency-to-save-power">1.3. Change reading frequency to save power</a></li>
257
- <li><a href="#14-specify-a-scan-region">1.4. Specify a scan region</a></li>
258
- <li><a href="#2-edit-the-preset-templates-directly">2. Edit the preset templates directly</a></li>
259
- <li><a href="#3-important-filter-the-results">3. [Important] Filter the results</a></li>
260
- <li><a href="#method-1-verify-results-across-multiple-frames">Method 1: Verify results across multiple frames</a></li>
261
- <li><a href="#method-2-eliminate-redundant-results-detected-within-a-short-time-frame">Method 2: Eliminate redundant results detected within a short time frame</a></li>
262
- <li><a href="#4-add-feedback">4. Add feedback</a></li></ul></li>
263
- <li><a href="#customizing-the-ui">Customizing the UI</a></li>
264
- <li><a href="#documentation">Documentation</a><ul>
265
- <li><a href="#api-reference">API Reference</a></li>
266
- <li><a href="#how-to-upgrade">How to Upgrade</a></li>
267
- <li><a href="#release-notes">Release Notes</a></li></ul></li>
268
- <li><a href="#next-steps">Next Steps</a></li>
269
- </ul>
270
- <p><strong>Popular Examples</strong></p>
271
- <ul>
272
- <li>Hello World - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/hello-world.html">Github</a> | <a href="https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.4.31&utm_source=npm">Run</a></li>
273
- <li>Angular App - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/angular">Github</a></li>
274
- <li>React App - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/react">Github</a></li>
275
- <li>Vue App - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/vue">Github</a></li>
276
- <li>PWA App - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/pwa">Github</a> | <a href="https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/pwa/helloworld-pwa.html?ver=10.4.31&utm_source=npm">Run</a></li>
277
- <li>WebView in Android and iOS - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v10.4.31/hello-world/webview">Github</a></li>
278
- <li>Read Driver Licenses - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/use-case/read-a-drivers-license/index.html">Github</a> | <a href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/read-a-drivers-license/index.html?ver=10.4.31&utm_source=npm">Run</a></li>
279
- <li>Fill A Form - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/use-case/fill-a-form-with-barcode-reading.html">Github</a> | <a href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/fill-a-form-with-barcode-reading.html?ver=10.4.31&utm_source=npm">Run</a></li>
280
- <li>Show result information on the video - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/use-case/show-result-texts-on-the-video.html">Github</a> | <a href="https://demo.dynamsoft.com/Samples/DBR/JS/use-case/show-result-texts-on-the-video.html?ver=10.4.31&utm_source=npm">Run</a></li>
281
- <li>Debug Camera and Collect Video Frame - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/others/debug">Github</a></li>
282
- </ul>
283
- <p>You can also:</p>
284
- <ul>
285
- <li>Try the Official Demo - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-demo/">Github</a> | <a href="https://demo.dynamsoft.com/barcode-reader-js/?ver=10.4.31&utm_source=npm">Run</a></li>
286
- <li>Try Online Examples - <a href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v10.4.31/">Github</a></li>
287
- </ul>
288
- <h2 id="hello-world---simplest-implementation">Hello World - Simplest Implementation</h2>
289
- <p>Let's start with the "Hello World" example of the DBR-JS SDK which demonstrates how to use the minimum code to enable a web page to read barcodes from a live video stream. </p>
290
- <p><strong>Basic Requirements</strong></p>
291
- <ul>
292
- <li>Internet connection</li>
293
- <li>A supported browser</li>
294
- <li>Camera access</li>
295
- </ul>
296
- <h3 id="understand-the-code">Understand the code</h3>
297
- <p>The complete code of the "Hello World" example is shown below</p>
298
- <pre><code class="hljs html language-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
299
- <span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
300
- <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
301
- <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"camera-view-container"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 100%; height: 60vh"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
302
- <span class="hljs-tag">&lt;<span class="hljs-name">textarea</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"results"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto"</span> <span class="hljs-attr">disabled</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">textarea</span>&gt;</span>
303
- <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.4.3100/dist/dbr.bundle.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
304
- <span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript">
305
- Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"</span>);
306
- Dynamsoft.Core.CoreModule.loadWasm([<span class="hljs-string">"dbr"</span>]);
307
- <span class="hljs-function">(<span class="hljs-params"><span class="hljs-keyword">async</span> (</span>) =&gt;</span> {
308
- <span class="hljs-keyword">let</span> cvRouter = <span class="hljs-keyword">await</span> Dynamsoft.CVR.CaptureVisionRouter.createInstance();
309
-
310
- <span class="hljs-keyword">let</span> cameraView = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance();
311
- <span class="hljs-keyword">let</span> cameraEnhancer = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
312
- <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">"#camera-view-container"</span>).append(cameraView.getUIElement());
313
- cvRouter.setInput(cameraEnhancer);
314
-
315
- <span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">"#results"</span>);
316
- cvRouter.addResultReceiver({ <span class="hljs-attr">onCapturedResultReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
317
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
318
- resultsContainer.textContent = <span class="hljs-string">''</span>;
319
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
320
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
321
- }
322
- }
323
- }});
324
-
325
- <span class="hljs-keyword">let</span> filter = <span class="hljs-keyword">new</span> Dynamsoft.Utility.MultiFrameResultCrossFilter();
326
- filter.enableResultCrossVerification(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
327
- filter.enableResultDeduplication(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
328
- <span class="hljs-keyword">await</span> cvRouter.addResultFilter(filter);
329
-
330
- <span class="hljs-keyword">await</span> cameraEnhancer.open();
331
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
332
- })();
333
- </span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
334
- <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
335
- <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
336
- </code></pre>
337
- <!--TOM: Update the code links-->
338
- <p align="center" style="text-align:center; white-space: normal; ">
339
- <a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.4.31/hello-world/hello-world.html" title="Code in Github" style="text-decoration:none;">
340
- <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;">
341
- </a>
342
- &nbsp;
343
- <a target="_blank" href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/" title="Run via JSFiddle" style="text-decoration:none;">
344
- <img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" >
345
- </a>
346
- &nbsp;
347
- <a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.4.31&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;">
348
- <img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;">
349
- </a>
350
- </p>
351
- <blockquote>
352
- <p>Don't want to deal with too many details? We also have an <strong>out-of-the-box</strong> version:</p>
353
- <p><a href="https://github.com/Dynamsoft/easy-barcode-scanner">Easy Barcode Scanner >></a> available for your reference.</p>
354
- <pre><code class="hljs js language-js"><span class="hljs-comment">// Scan instantly with a single function!</span>
355
- <span class="hljs-keyword">let</span> txt = <span class="hljs-keyword">await</span> EasyBarcodeScanner.scan();
356
- </code></pre>
357
- </blockquote>
358
- <hr />
359
- <h4 id="about-the-code">About the code</h4>
360
- <ul>
361
- <li><p><code>Dynamsoft.License.LicenseManager.initLicense()</code>: This method initializes the license for using the SDK in the application. Note that the string "<strong>DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9</strong>" used in this example points to an online license that requires a network connection to work. Read more on <a href="#specify-the-license">Specify the license</a>.</p></li>
362
- <li><p><code>Dynamsoft.Core.CoreModule.loadWasm(["dbr"])</code>: This is an optional code. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding.</p></li>
363
- <li><p><code>Dynamsoft.CVR.CaptureVisionRouter.createInstance()</code>: This method creates a <code>CaptureVisionRouter</code> object <code>cvRouter</code> which controls the entire process in three steps:</p></li>
364
- <li><p><strong>Retrieve Images from the Image Source</strong></p>
365
- <ul>
366
- <li><code>cvRouter</code> connects to the image source through the <a href="https://www.dynamsoft.com/capture-vision/docs/core/architecture/input.html#image-source-adapter?lang=js">ImageSourceAdapter</a> interface with the method <code>setInput()</code>.<br />
367
- <code>js
368
- cvRouter.setInput(cameraEnhancer);
369
- </code><br />
370
- &gt; The image source in our case is a <a href="https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html">CameraEnhancer</a> object created with <code>Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView)</code></li></ul></li>
371
- <li><p><strong>Coordinate Image-Processing Tasks</strong></p>
372
- <ul>
373
- <li>The coordination happens behind the scenes. <code>cvRouter</code> starts the process by specifying a preset template "ReadSingleBarcode" in the method <code>startCapturing()</code>.<br />
374
- <code>js
375
- cvRouter.startCapturing("ReadSingleBarcode");
376
- </code></li></ul></li>
377
- <li><p><strong>Dispatch Results to Listening Objects</strong></p>
378
- <ul>
379
- <li>The processing results are returned through the <a href="https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js">CapturedResultReceiver</a> interface. The <code>CapturedResultReceiver</code> object is registered to <code>cvRouter</code> via the method <code>addResultReceiver()</code>. For more information, please check out <a href="#register-a-result-receiver">Register a result receiver</a>.<br />
380
- <code>js
381
- cvRouter.addResultReceiver({/*The-CapturedResultReceiver-Object"*/});
382
- </code></li>
383
- <li>Also note that reading from video is extremely fast and there could be many duplicate results. We can use a <a href="#filter-the-results-important">filter</a> with result deduplication enabled to filter out the duplicate results. The object is registered to <code>cvRouter</code> via the method <code>addResultFilter()</code>.<br />
384
- <code>js
385
- cvRouter.addResultFilter(filter);
386
- </code></li></ul></li>
387
- </ul>
388
- <blockquote>
389
- <p>Read more on <a href="https://www.dynamsoft.com/capture-vision/docs/core/architecture/#capture-vision-router">Capture Vision Router</a>.</p>
390
- </blockquote>
391
- <h3 id="run-the-example">Run the example</h3>
392
- <p>You can run the example deployed to <a href="https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.4.31&utm_source=npm">the Dynamsoft Demo Server</a> or test it with <a href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/">JSFiddle code editor</a>. </p>
393
- <p>You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it.</p>
394
- <p>When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed.</p>
395
- <p>Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser.</p>
396
- <blockquote>
397
- <p><em>Secure Contexts</em>:</p>
398
- <p>If you open the web page as <code>http://</code> , our SDK may not work correctly because the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia">MediaDevices: getUserMedia()</a> and other methods only work in <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts">secure contexts</a> (HTTPS, <code>localhost</code>, <code>127.0.0.1</code>, <code>file://</code>), in some or all supporting browsers.</p>
399
- <p>Regarding configuring https on your server, these guides for <a href="https://nginx.org/en/docs/http/configuring_https_servers.html">nginx</a> / <a href="https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/">IIS</a> / <a href="https://dzone.com/articles/setting-ssl-tomcat-5-minutes">tomcat</a> / <a href="https://nodejs.org/docs/v0.4.1/api/tls.html">nodejs</a> might help.</p>
400
- <p>If the test doesn't go as expected, you can <a href="https://www.dynamsoft.com/company/contact/?ver=10.4.31&utm_source=npm&product=dbr&package=js">contact us</a>.</p>
401
- </blockquote>
402
- <h2 id="preparing-the-sdk">Preparing the SDK</h2>
403
- <h3 id="step-1-include-the-sdk">Step 1: Include the SDK</h3>
404
- <h4 id="option-1-use-a-public-cdn">Option 1: Use a public CDN</h4>
405
- <p>The simplest way to include the SDK is to use either the <a href="https://jsdelivr.com/">jsDelivr</a> or <a href="https://unpkg.com/">UNPKG</a> CDN. The "hello world" example above uses <strong>jsDelivr</strong>.</p>
406
- <ul>
407
- <li>jsDelivr</li>
408
- </ul>
409
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader-bundle@10.4.3100/dist/dbr.bundle.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
410
- </code></pre>
411
- <ul>
412
- <li>UNPKG</li>
413
- </ul>
414
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/dynamsoft-barcode-reader-bundle@10.4.3100/dist/dbr.bundle.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
415
- </code></pre>
416
- <ul>
417
- <li>In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test.</li>
418
- </ul>
419
- <pre><code class="hljs html language-html"> <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader-bundle@10.4.3100/dist/dbr.bundle.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
420
- </code></pre>
421
- <p>However, please <strong>DO NOT</strong> use <code>download2.dynamsoft.com</code> resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself.</p>
422
- <ul>
423
- <li>In frameworks like React, Vue and Angular, you may want to add the package as a dependency.</li>
424
- </ul>
425
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@10.4.3100 -E
426
- <span class="hljs-comment"># or</span>
427
- yarn add dynamsoft-barcode-reader-bundle@10.4.3100 -E
428
- </code></pre>
429
- <p>NOTE that in frameworks, you need to <a href="#specify-the-location-of-the-engine-files-optional">specify the engineResourcePaths</a>.</p>
430
- <h4 id="option-2-host-the-sdk-yourself-optional">Option 2: Host the SDK yourself (optional)</h4>
431
- <p>Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application.</p>
432
- <ul>
433
- <li><p>From the website</p>
434
- <p><a href="https://www.dynamsoft.com/barcode-reader/downloads/?ver=10.4.31&utm_source=npm&product=dbr&package=js">Download Dynamsoft Barcode Reader JavaScript Package</a></p>
435
- <p>The resources are located at path <code>dynamsoft/distributables/&lt;pkg&gt;@&lt;version&gt;</code>.</p></li>
436
- <li><p>From npm</p></li>
437
- </ul>
438
- <pre><code class="hljs sh language-sh"> npm i dynamsoft-barcode-reader-bundle@10.4.3100 -E
439
- <span class="hljs-comment"># Compared with using CDN, you need to set up more resources.</span>
440
- npm i dynamsoft-capture-vision-std@1.4.21 -E
441
- npm i dynamsoft-image-processing@2.4.31 -E
442
- </code></pre>
443
- <p>The resources are located at the path <code>node_modules/&lt;pkg&gt;</code>, without <code>@&lt;version&gt;</code>. You must copy "dynamsoft-xxx" packages elsewhere and add <code>@&lt;version&gt;</code>. The <code>&lt;version&gt;</code> can be obtained from <code>package.json</code> of each package. Another thing to do is to <a href="#2-optional-specify-the-location-of-the-engine-files">specify the engineResourcePaths</a> so that the SDK can correctly locate the resources.</p>
444
- <blockquote>
445
- <p>Since "node<em>modules" is reserved for Node.js dependencies, and in our case the package is used only as static resources, we recommend either renaming the "node</em>modules" folder or moving the "dynamsoft-" packages to a dedicated folder for static resources in your project to facilitate self-hosting.</p>
446
- </blockquote>
447
- <p>You can typically include SDK like this:</p>
448
- <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"path/to/dynamsoft-barcode-reader-bundle@10.4.3100/dist/dbr.bundle.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
449
- </code></pre>
450
- <p><em>Note</em>:</p>
451
- <ul>
452
- <li>Certain legacy web application servers may lack support for the <code>application/wasm</code> mimetype for .wasm files. To address this, you have two options:</li>
453
- </ul>
454
- <ol>
455
- <li>Upgrade your web application server to one that supports the <code>application/wasm</code> mimetype.</li>
456
- <li>Manually define the mimetype on your server. You can refer to the guides for <a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess#media_types_and_character_encodings">apache</a> / <a href="https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap">IIS</a> / <a href="https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types">nginx</a>.</li>
457
- </ol>
458
- <ul>
459
- <li>To work properly, the SDK requires a few engine files, which are relatively large and may take quite a few seconds to download. We recommend that you set a longer cache time for these engine files, to maximize the performance of your web application.</li>
460
- </ul>
461
- <pre><code>hljs <span class="hljs-keyword">Cache</span><span class="hljs-params">-Control</span>: <span class="hljs-keyword">max</span><span class="hljs-params">-age</span>=<span class="hljs-number">31536000</span>
462
- </code></pre>
463
- <p>Reference: <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control">Cache-Control</a>.</p>
464
- <h3 id="step-2-prepare-the-sdk">Step 2: Prepare the SDK</h3>
465
- <p>Before using the SDK, you need to configure a few things.</p>
466
- <h4 id="1-specify-the-license">1. Specify the license</h4>
467
- <p>To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key.</p>
468
- <pre><code class="hljs javascript language-javascript">Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"</span>);
469
- </code></pre>
470
- <p>As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the <a href="https://www.dynamsoft.com/customer/license/trialLicense?ver=10.4.31&utm_source=npm&product=dbr&package=js" target="_blank">Request a Trial License</a> link.</p>
471
- <blockquote>
472
- <p>Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples.</p>
473
- </blockquote>
474
- <h4 id="2-optional-specify-the-location-of-the-engine-files">2. [Optional] Specify the location of the "engine" files</h4>
475
- <p>This is usually only required with frameworks like Angular, React or Vue.</p>
476
- <p>The purpose is to tell the SDK where to find the engine files (*.worker.js, *.wasm.js and *.wasm, etc.).</p>
477
- <pre><code class="hljs ts language-ts"><span class="hljs-comment">// in framework</span>
478
- <span class="hljs-keyword">import</span> { CoreModule } <span class="hljs-keyword">from</span> <span class="hljs-string">"dynamsoft-barcode-reader-bundle"</span>;
479
- CoreModule.engineResourcePaths.rootDirectory = <span class="hljs-string">"https://cdn.jsdelivr.net/npm/"</span>;
480
- </code></pre>
481
- <pre><code class="hljs js language-js"><span class="hljs-comment">// in pure js</span>
482
- Dynamsoft.Core.CoreModule.engineResourcePaths.rootDirectory = <span class="hljs-string">"https://cdn.jsdelivr.net/npm/"</span>;
483
- </code></pre>
484
- <p>These code uses the jsDelivr CDN as an example, feel free to change it to your own location.</p>
485
- <h2 id="using-the-sdk">Using the SDK</h2>
486
- <h3 id="step-1-preload-the-module">Step 1: Preload the module</h3>
487
- <p>The image processing logic is encapsulated within .wasm library files, and these files may require some time for downloading. To enhance the speed, we advise utilizing the following method to preload the libraries.</p>
488
- <pre><code class="hljs js language-js"><span class="hljs-comment">// Preload the .wasm files</span>
489
- <span class="hljs-keyword">await</span> Dynamsoft.Core.CoreModule.loadWasm([<span class="hljs-string">"dbr"</span>]);
490
- </code></pre>
491
- <h3 id="step-2-create-a-capturevisionrouter-object">Step 2: Create a CaptureVisionRouter object</h3>
492
- <p>To use the SDK, we first create a <code>CaptureVisionRouter</code> object.</p>
493
- <pre><code class="hljs javascript language-javascript">Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"</span>);
494
-
495
- <span class="hljs-keyword">let</span> cvRouter = <span class="hljs-literal">null</span>;
496
- <span class="hljs-keyword">try</span> {
497
- cvRouter = <span class="hljs-keyword">await</span> Dynamsoft.CVR.CaptureVisionRouter.createInstance();
498
- } <span class="hljs-keyword">catch</span> (ex) {
499
- <span class="hljs-built_in">console</span>.error(ex);
500
- }
501
- </code></pre>
502
- <p><em>Tip</em>:</p>
503
- <p>When creating a <code>CaptureVisionRouter</code> object within a function which may be called more than once, it's best to use a "helper" variable to avoid double creation such as <code>pCvRouter</code> in the following code:</p>
504
- <pre><code class="hljs javascript language-javascript">Dynamsoft.License.LicenseManager.initLicense(<span class="hljs-string">"DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"</span>);
505
-
506
- <span class="hljs-keyword">let</span> pCvRouter = <span class="hljs-literal">null</span>; <span class="hljs-comment">// The helper variable which is a promise of cvRouter</span>
507
- <span class="hljs-keyword">let</span> cvRouter = <span class="hljs-literal">null</span>;
508
-
509
- <span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'btn-scan'</span>).addEventListener(<span class="hljs-string">'click'</span>, <span class="hljs-keyword">async</span> () =&gt; {
510
- <span class="hljs-keyword">try</span> {
511
- cvRouter = <span class="hljs-keyword">await</span> (pCvRouter = pCvRouter || Dynamsoft.CVR.CaptureVisionRouter.createInstance());
512
- } <span class="hljs-keyword">catch</span> (ex) {
513
- <span class="hljs-built_in">console</span>.error(ex);
514
- }
515
- });
516
- </code></pre>
517
- <h3 id="step-3-connect-an-image-source">Step 3: Connect an image source</h3>
518
- <p>The <code>CaptureVisionRouter</code> object, denoted as <code>cvRouter</code>, is responsible for handling images provided by an image source. In our scenario, we aim to detect barcodes directly from a live video stream. To facilitate this, we initialize a <code>CameraEnhancer</code> object, identified as <code>cameraEnhancer</code>, which is specifically designed to capture image frames from the video feed and subsequently forward them to <code>cvRouter</code>.</p>
519
- <p>To enable video streaming on the webpage, we create a <code>CameraView</code> object referred to as <code>cameraView</code>, which is then passed to <code>cameraEnhancer</code>, and its content is displayed on the webpage.</p>
520
- <pre><code class="hljs html language-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">id</span>=<span class="hljs-string">"camera-view-container"</span> <span class="hljs-attr">style</span>=<span class="hljs-string">"width: 100%; height: 100vh"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
521
- </code></pre>
522
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> cameraView = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance();
523
- <span class="hljs-keyword">let</span> cameraEnhancer = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
524
- <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">"#camera-view-container"</span>).append(cameraView.getUIElement());
525
- cvRouter.setInput(cameraEnhancer);
526
- </code></pre>
527
- <h3 id="step-4-register-a-result-receiver">Step 4: Register a result receiver</h3>
528
- <p>Once the image processing is complete, the results are sent to all the registered <code>CapturedResultReceiver</code> objects. Each <code>CapturedResultReceiver</code> object may encompass one or multiple callback functions associated with various result types. This time we use <code>onCapturedResultReceived</code>:</p>
529
- <!--In our particular case, our focus is on identifying barcodes within the images, so it's sufficient to define the callback function `onDecodedBarcodesReceived`:-->
530
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">"#results"</span>);
531
- <span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
532
- resultReceiver.onCapturedResultReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
533
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
534
- resultsContainer.textContent = <span class="hljs-string">''</span>;
535
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
536
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
537
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
538
- }
539
- }
540
- };
541
- cvRouter.addResultReceiver(resultReceiver);
542
- </code></pre>
543
- <p>You can also write code like this. It is the same.</p>
544
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> resultsContainer = <span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">"#results"</span>);
545
- cvRouter.addResultReceiver({ <span class="hljs-attr">onCapturedResultReceived</span>: <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
546
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
547
- resultsContainer.textContent = <span class="hljs-string">''</span>;
548
- <span class="hljs-keyword">for</span> (<span class="hljs-keyword">let</span> item <span class="hljs-keyword">of</span> result.barcodeResultItems) {
549
- <span class="hljs-comment">// In this example, the barcode results are displayed on the page below the video.</span>
550
- resultsContainer.textContent += <span class="hljs-string">`<span class="hljs-subst">${item.formatString}</span>: <span class="hljs-subst">${item.text}</span>\n\n`</span>;
551
- }
552
- }
553
- }});
554
- </code></pre>
555
- <p>Check out <a href="https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html">CapturedResultReceiver</a> for more information.</p>
556
- <h3 id="step-5-start-process-video-frames">Step 5: Start process video frames</h3>
557
- <p>With the setup now complete, we can proceed to process the images in two straightforward steps:</p>
558
- <ol>
559
- <li>Initiate the image source to commence image acquisition. In our scenario, we invoke the <code>open()</code> method on <code>cameraEnhancer</code> to initiate video streaming and simultaneously initiate the collection of images. These collected images will be dispatched to <code>cvRouter</code> as per its request.</li>
560
- <li>Define a preset template to commence image processing. In our case, we utilize the "ReadSingleBarcode" template, specifically tailored for processing images containing a single barcode.</li>
561
- </ol>
562
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">await</span> cameraEnhancer.open();
563
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
564
- </code></pre>
565
- <p><em>Note</em>:</p>
566
- <ul>
567
- <li><code>cvRouter</code> is engineered to consistently request images from the image source.</li>
568
- <li>Various preset templates are at your disposal for barcode reading:</li>
569
- </ul>
570
- <table>
571
- <thead>
572
- <tr>
573
- <th>Template Name</th>
574
- <th>Function Description</th>
575
- </tr>
576
- </thead>
577
- <tbody>
578
- <tr>
579
- <td><strong>ReadBarcodes_Default</strong></td>
580
- <td>Scans multiple barcodes by default setting.</td>
581
- </tr>
582
- <tr>
583
- <td><strong>ReadSingleBarcode</strong></td>
584
- <td>Quickly scans a single barcode.</td>
585
- </tr>
586
- <tr>
587
- <td><strong>ReadBarcodes_SpeedFirst</strong></td>
588
- <td>Prioritizes speed in scanning multiple barcodes.</td>
589
- </tr>
590
- <tr>
591
- <td><strong>ReadBarcodes_ReadRateFirst</strong></td>
592
- <td>Maximizes the number of barcodes read.</td>
593
- </tr>
594
- <tr>
595
- <td><strong>ReadBarcodes_Balance</strong></td>
596
- <td>Balances speed and quantity in reading multiple barcodes.</td>
597
- </tr>
598
- <tr>
599
- <td><strong>ReadDenseBarcodes</strong></td>
600
- <td>Specialized in reading barcodes with high information density.</td>
601
- </tr>
602
- <tr>
603
- <td><strong>ReadDistantBarcodes</strong></td>
604
- <td>Capable of reading barcodes from extended distances.</td>
605
- </tr>
606
- </tbody>
607
- </table>
608
- <p>Read more on the <a href="https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html">preset CaptureVisionTemplates</a>.</p>
609
- <h2 id="customizing-the-process">Customizing the process</h2>
610
- <h3 id="1-adjust-the-preset-template-settings">1. Adjust the preset template settings</h3>
611
- <p>When making adjustments to some basic tasks, we often only need to modify <a href="https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.html">SimplifiedCaptureVisionSettings</a>.</p>
612
- <h4 id="11-change-barcode-settings">1.1. Change barcode settings</h4>
613
- <p>The preset templates can be updated to meet different requirements. For example, the following code limits the barcode format to QR code.</p>
614
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
615
- settings.barcodeSettings.barcodeFormatIds =
616
- Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE;
617
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
618
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
619
- </code></pre>
620
- <p>For a list of adjustable barcode settings, check out <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/simplified-barcode-reader-settings.html">SimplifiedBarcodeReaderSettings</a>.</p>
621
- <h4 id="12-retrieve-the-original-image">1.2. Retrieve the original image</h4>
622
- <p>Additionally, we have the option to modify the template to retrieve the original image containing the barcode.</p>
623
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
624
- settings.capturedResultItemTypes |=
625
- Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE;
626
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
627
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
628
- </code></pre>
629
- <p>Limit the barcode format to QR code, and retrieve the original image containing the barcode, at the same time.</p>
630
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
631
- settings.capturedResultItemTypes =
632
- Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE |
633
- Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE;
634
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
635
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
636
- </code></pre>
637
- <p>Please be aware that it is necessary to update the <code>CapturedResultReceiver</code> object to obtain the original image. For instance:</p>
638
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">const</span> EnumCRIT = Dynamsoft.Core.EnumCapturedResultItemType;
639
- resultReceiver.onCapturedResultReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
640
- <span class="hljs-keyword">if</span> (result.barcodeResultItems?.length) {
641
- <span class="hljs-comment">// Use a filter to get the image on which barcodes are found.</span>
642
- <span class="hljs-keyword">let</span> image = result.items.filter(
643
- <span class="hljs-function"><span class="hljs-params">item</span> =&gt;</span> item.type === EnumCRIT.CRIT_ORIGINAL_IMAGE
644
- )[<span class="hljs-number">0</span>].imageData;
645
- }
646
- };
647
- </code></pre>
648
- <h4 id="13-change-reading-frequency-to-save-power">1.3. Change reading frequency to save power</h4>
649
- <p>The SDK is initially configured to process images sequentially without any breaks. Although this setup maximizes performance, it can lead to elevated power consumption, potentially causing the device to overheat. In many cases, it's possible to reduce the reading speed while still satisfying business requirements. The following code snippet illustrates how to adjust the SDK to process an image every 500 milliseconds:</p>
650
- <blockquote>
651
- <p>Please bear in mind that in the following code, if an image's processing time is shorter than 500 milliseconds, the SDK will wait for the full 500 milliseconds before proceeding to process the next image. Conversely, if an image's processing time exceeds 500 milliseconds, the subsequent image will be processed immediately upon completion.</p>
652
- </blockquote>
653
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
654
- settings.minImageCaptureInterval = <span class="hljs-number">500</span>;
655
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
656
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
657
- </code></pre>
658
- <h4 id="14-specify-a-scan-region">1.4. Specify a scan region</h4>
659
- <p>We can specify a scan region to allow the SDK to process only part of the image, improving processing speed. The code snippet below demonstrates how to do this using the <code>cameraEnhancer</code> image source.</p>
660
- <pre><code class="hljs javascript language-javascript">cameraEnhancer = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraEnhancer.createInstance(cameraView);
661
- <span class="hljs-comment">// In this example, we set the scan region to cover the central 25% of the image.</span>
662
- cameraEnhancer.setScanRegion({
663
- <span class="hljs-attr">x</span>: <span class="hljs-number">25</span>,
664
- <span class="hljs-attr">y</span>: <span class="hljs-number">25</span>,
665
- <span class="hljs-attr">width</span>: <span class="hljs-number">50</span>,
666
- <span class="hljs-attr">height</span>: <span class="hljs-number">50</span>,
667
- <span class="hljs-attr">isMeasuredInPercentage</span>: <span class="hljs-literal">true</span>,
668
- });
669
- </code></pre>
670
- <p><em>Note</em>:</p>
671
- <ol>
672
- <li>By configuring the region at the image source, images are cropped before processing, removing the need to adjust any further processing settings.</li>
673
- <li><code>cameraEnhancer</code> enhances interactivity by overlaying a mask on the video, clearly marking the scanning region.</li>
674
- </ol>
675
- <p><em>See Also</em>:</p>
676
- <p><a href="https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/acquisition.html#setscanregion">CameraEnhancer::setScanRegion</a></p>
677
- <!-- Since DCE is always used, no need to use this approach
678
-
679
-
680
- You can use the parameter `roi` (region of interest) together with the parameter `roiMeasuredInPercentage` to configure the SDK to only read a specific region on the image frames. For example, the following code limits the reading in the center 25%( = 50% * 50%) of the image frames:
681
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
682
- settings.roiMeasuredInPercentage = <span class="hljs-literal">true</span>;
683
- settings.roi.points = [
684
- { <span class="hljs-attr">x</span>: <span class="hljs-number">25</span>, <span class="hljs-attr">y</span>: <span class="hljs-number">25</span> },
685
- { <span class="hljs-attr">x</span>: <span class="hljs-number">75</span>, <span class="hljs-attr">y</span>: <span class="hljs-number">25</span> },
686
- { <span class="hljs-attr">x</span>: <span class="hljs-number">75</span>, <span class="hljs-attr">y</span>: <span class="hljs-number">75</span> },
687
- { <span class="hljs-attr">x</span>: <span class="hljs-number">25</span>, <span class="hljs-attr">y</span>: <span class="hljs-number">75</span> },
688
- ];
689
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
690
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
691
- </code></pre> -->
692
- <!--
693
- * Specify the maximum time allowed for processing each image
694
-
695
- You can set the maximum time allowed for processing a single image with the property `timeout`.
696
-
697
- > Please be aware that the SDK will cease processing an image if its processing time exceeds the duration specified by the `timeout` parameter. It should not be confused with the previously discussed parameter, `minImageCaptureInterval`.
698
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">let</span> settings = <span class="hljs-keyword">await</span> cvRouter.getSimplifiedSettings(<span class="hljs-string">"ReadSingleBarcode"</span>);
699
- settings.timeout = <span class="hljs-number">500</span>;
700
- <span class="hljs-keyword">await</span> cvRouter.updateSettings(<span class="hljs-string">"ReadSingleBarcode"</span>, settings);
701
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>);
702
- </code></pre>
703
- -->
704
- <h3 id="2-edit-the-preset-templates-directly">2. Edit the preset templates directly</h3>
705
- <p>The preset templates have many more settings that can be customized to suit your use case best. If you <a href="https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/">download the SDK from Dynamsoft website</a>, you can find the templates under</p>
706
- <ul>
707
- <li>"/dynamsoft-barcode-reader-js-10.4.3100/dynamsoft/templates/"</li>
708
- </ul>
709
- <p>Upon completing the template editing, you can invoke the <code>initSettings</code> method and provide it with the template path as an argument.</p>
710
- <pre><code class="hljs javascript language-javascript"><span class="hljs-keyword">await</span> cvRouter.initSettings(<span class="hljs-string">"PATH-TO-THE-FILE"</span>); <span class="hljs-comment">// E.g. "https://your-website/ReadSingleBarcode.json")</span>
711
- <span class="hljs-keyword">await</span> cvRouter.startCapturing(<span class="hljs-string">"ReadSingleBarcode"</span>); <span class="hljs-comment">// Make sure the name matches one of the CaptureVisionTemplates in the template JSON file.</span>
712
- </code></pre>
713
- <h3 id="3-important-filter-the-results">3. [Important] Filter the results</h3>
714
- <p>When processing video frames, the same barcode is often detected multiple times. To improve the user experience, we can use the <a href="https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.html">MultiFrameResultCrossFilter</a> object. This object provides two methods for handling duplicate detections, which can be used independently or together, depending on what best suits your application needs:</p>
715
- <h4 id="method-1-verify-results-across-multiple-frames">Method 1: Verify results across multiple frames</h4>
716
- <pre><code class="hljs js language-js"><span class="hljs-keyword">let</span> filter = <span class="hljs-keyword">new</span> Dynamsoft.Utility.MultiFrameResultCrossFilter();
717
- filter.enableResultCrossVerification(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
718
- <span class="hljs-keyword">await</span> cvRouter.addResultFilter(filter);
719
- </code></pre>
720
- <p><em>Note</em>:</p>
721
- <ul>
722
- <li><code>enableResultCrossVerification</code> was designed to cross-validate the outcomes across various frames in a video streaming scenario, enhancing the reliability of the final results. This validation is particularly crucial for barcodes with limited error correction capabilities, such as 1D codes.</li>
723
- </ul>
724
- <h4 id="method-2-eliminate-redundant-results-detected-within-a-short-time-frame">Method 2: Eliminate redundant results detected within a short time frame</h4>
725
- <pre><code class="hljs js language-js"><span class="hljs-keyword">let</span> filter = <span class="hljs-keyword">new</span> Dynamsoft.Utility.MultiFrameResultCrossFilter();
726
- filter.enableResultDeduplication(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
727
- <span class="hljs-keyword">await</span> cvRouter.addResultFilter(filter);
728
- </code></pre>
729
- <p><em>Note</em>:</p>
730
- <ul>
731
- <li><code>enableResultDeduplication</code> was designed to prevent high usage in video streaming scenarios, addressing the repetitive processing of the same code within a short period of time.</li>
732
- </ul>
733
- <p>Initially, the filter is set to forget a result 3 seconds after it is first received. During this time frame, if an identical result appears, it is ignored.</p>
734
- <blockquote>
735
- <p>It's important to know that in version 9.x or earlier, the occurrence of an identical result would reset the timer, thus reinitiating the 3-second count at that point. However, in version 10.2.10 and later, an identical result no longer resets the timer but is instead disregarded, and the duration count continues uninterrupted.</p>
736
- </blockquote>
737
- <p>Under certain circumstances, this duration can be extended with the method <code>setDuplicateForgetTime()</code>.</p>
738
- <pre><code class="hljs js language-js"><span class="hljs-keyword">let</span> filter = <span class="hljs-keyword">new</span> Dynamsoft.Utility.MultiFrameResultCrossFilter();
739
- filter.setDuplicateForgetTime(<span class="hljs-number">5000</span>); <span class="hljs-comment">// Extend the duration to 5 seconds.</span>
740
- <span class="hljs-keyword">await</span> cvRouter.addResultFilter(filter);
741
- </code></pre>
742
- <p>You can also enable both options at the same time:</p>
743
- <pre><code class="hljs js language-js"><span class="hljs-keyword">let</span> filter = <span class="hljs-keyword">new</span> Dynamsoft.Utility.MultiFrameResultCrossFilter();
744
- filter.enableResultCrossVerification(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
745
- filter.enableResultDeduplication(<span class="hljs-string">"barcode"</span>, <span class="hljs-literal">true</span>);
746
- filter.setDuplicateForgetTime(<span class="hljs-number">5000</span>);
747
- <span class="hljs-keyword">await</span> cvRouter.addResultFilter(filter);
748
- </code></pre>
749
- <h3 id="4-add-feedback">4. Add feedback</h3>
750
- <p>When a barcode is detected within the video stream, its position is immediately displayed within the video. Furthermore, utilizing the "Dynamsoft Camera Enhancer" SDK, we can introduce feedback mechanisms, such as emitting a "beep" sound or triggering a "vibration".</p>
751
- <p>The following code snippet adds a "beep" sound for when a barcode is found:</p>
752
- <pre><code class="hljs js language-js"><span class="hljs-keyword">const</span> resultReceiver = <span class="hljs-keyword">new</span> Dynamsoft.CVR.CapturedResultReceiver();
753
- resultReceiver.onDecodedBarcodesReceived = <span class="hljs-function">(<span class="hljs-params">result</span>) =&gt;</span> {
754
- <span class="hljs-keyword">if</span> (result.barcodeResultItems.length &gt; <span class="hljs-number">0</span>) {
755
- Dynamsoft.DCE.Feedback.beep();
756
- }
757
- };
758
- cvRouter.addResultReceiver(resultReceiver);
759
- </code></pre>
760
- <h2 id="customizing-the-ui">Customizing the UI</h2>
761
- <pre><code class="hljs javascript language-javascript"><span class="hljs-comment">// Create a CameraView instance with default settings</span>
762
- <span class="hljs-keyword">let</span> cameraView = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance();
763
- <span class="hljs-comment">// Create a CameraView instance with a specified HTML file path, typically a local or remote URL</span>
764
- <span class="hljs-keyword">let</span> cameraView1 = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance(<span class="hljs-string">'@engineResourcePath/dce.mobile-native.ui.html'</span>);
765
- <span class="hljs-comment">// Create a CameraView instance within a specified DOM element</span>
766
- <span class="hljs-keyword">let</span> cameraView2 = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'my-ui'</span>));
767
- <span class="hljs-comment">// Create a CameraView instance using a custom UI file path</span>
768
- <span class="hljs-keyword">let</span> cameraView3 = <span class="hljs-keyword">await</span> Dynamsoft.DCE.CameraView.createInstance(<span class="hljs-string">'url/to/my/ui.html'</span>);
769
-
770
- <span class="hljs-comment">// Get the UI element associated with the cameraView instance</span>
771
- <span class="hljs-keyword">let</span> uiElement = cameraView.getUIElement();
772
- <span class="hljs-comment">// Remove the camera selection dropdown from the CameraView's UI element</span>
773
- uiElement.shadowRoot.querySelector(<span class="hljs-string">'.dce-sel-camera'</span>).remove();
774
- <span class="hljs-comment">// Remove the resolution selection dropdown from the CameraView's UI element</span>
775
- uiElement.shadowRoot.querySelector(<span class="hljs-string">'.dce-sel-resolution'</span>).remove();
776
- </code></pre>
777
- <p>The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on how to <a href="https://www.dynamsoft.com/barcode-reader/docs/core/programming/features/ui-customization-js.html?lang=js">customize the UI</a>.</p>
778
- <h2 id="documentation">Documentation</h2>
779
- <h3 id="api-reference">API Reference</h3>
780
- <p>You can check out the detailed documentation about the APIs of the SDK at<br />
781
- <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=10.4.3100">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=10.4.3100</a>.</p>
782
- <!-- Compatibility is basically not an issue. Pls remove to another place
783
-
784
- ## System Requirements
785
-
786
- DBR requires the following features to work:
787
-
788
- - Secure context (HTTPS deployment)
789
-
790
- When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons
791
-
792
- - Access to the camera video stream is only granted in a security context. Most browsers impose this restriction.
793
- > Some browsers like Chrome may grant the access for `http://127.0.0.1` and `http://localhost` or even for pages opened directly from the local disk (`file:///...`). This can be helpful for temporary development and test.
794
-
795
- - Dynamsoft License requires a secure context to work.
796
-
797
- - `WebAssembly`, `Blob`, `URL`/`createObjectURL`, `Web Workers`
798
-
799
- The above four features are required for the SDK to work.
800
-
801
- - `MediaDevices`/`getUserMedia`
802
-
803
- This API is required for in-browser video streaming.
804
-
805
- - `getSettings`
806
-
807
- This API inspects the video input which is a `MediaStreamTrack` object about its constrainable properties.
808
-
809
- The following table is a list of supported browsers based on the above requirements:
810
-
811
- | Browser Name | Version |
812
- | :----------: | :--------------: |
813
- | Chrome | v78+<sup>1</sup> |
814
- | Firefox | v68+<sup>1</sup> |
815
- | Edge | v79+ |
816
- | Safari | v14+ |
817
-
818
- <sup>1</sup> devices running iOS needs to be on iOS 14.3+ for camera video streaming to work in Chrome, Firefox or other Apps using webviews.
819
-
820
- Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK. Browser compatibility ultimately depends on whether the browser on that particular operating system supports the features listed above.
821
-
822
- -->
823
- <h3 id="how-to-upgrade">How to Upgrade</h3>
824
- <p>If you want to upgrade the SDK from an old version to a newer one, please see <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/upgrade-guide/index.html?ver=10.4.3100&utm_source=npm">how to upgrade</a>.</p>
825
- <h3 id="release-notes">Release Notes</h3>
826
- <p>Learn about what are included in each release at <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html?ver=10.4.31&utm_source=npm">https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html</a>.</p>
827
- <h2 id="next-steps">Next Steps</h2>
828
- <p>Now that you have got the SDK integrated, you can choose to move forward in the following directions</p>
829
- <ol>
830
- <li>Learn how to <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/use-in-framework.html">Use in Framework</a></li>
831
- <li>Check out the <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/index.html?ver=10.4.31">Official Samples and Demo</a></li>
832
- <li>Learn about the <a href="https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html?ver=10.4.3100">APIs of the SDK</a></li>
833
- </ol>
834
- </div>
835
- </body>
836
- </html>