diff --git a/Api Reference.url b/Api Reference.url index c935278..7269631 100644 --- a/Api Reference.url +++ b/Api Reference.url @@ -1,2 +1,2 @@ [InternetShortcut] -URL=https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/?ver=9.6.31 \ No newline at end of file +URL=https://www.dynamsoft.com/barcode-reader/programming/javascript/api-reference/?ver=9.6.32 \ No newline at end of file diff --git a/README.md b/README.md index 0653635..3b94752 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ 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. - - -In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website. +In this guide, you will learn step by step how to integrate the DBR-JS SDK into your website. Table of Contents @@ -33,21 +29,21 @@ In this guide, you will learn step by step on how to integrate the DBR-JS SDK in **Popular Examples** -- Hello World - [Guide](#hello-world---simplest-implementation) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/1.hello-world/1.hello-world.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/1.hello-world.html?ver=9.6.31&utm_source=github) -- Angular App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-angular.html?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/1.hello-world/3.read-video-angular) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/3.read-video-angular/dist/hello-world/?ver=9.6.31&utm_source=github) -- React App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-reactjs.html?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/1.hello-world/4.read-video-react) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/4.read-video-react/build/?ver=9.6.31&utm_source=github) -- Vue App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-vuejsv3.html?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/1.hello-world/6.read-video-vue3) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/6.read-video-vue3/dist/?ver=9.6.31&utm_source=github) -- PWA App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-pwa.html?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/1.hello-world/10.read-video-pwa) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/10.read-video-pwa/helloworld-pwa.html?ver=9.6.31&utm_source=github) -- WebView in Android and iOS - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v9.6.31/1.hello-world/14.read-video-webview) -- Read Driver Licenses - [Guide](https://www.dynamsoft.com/barcode-reader/docs/core/programming/usecases/scan-and-parse-AAMVA.html?ver=9.6.31&utm_source=github&&lang=js) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/4.use-case/2.read-a-drivers-license.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/4.use-case/2.read-a-drivers-license.html?ver=9.6.31&utm_source=github) -- Fill A Form - [Guide](https://www.dynamsoft.com/barcode-reader/docs/core/programming/usecases/scan-barcodes-as-input.html?lang=js&&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/4.use-case/1.fill-a-form-with-barcode-reading.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/4.use-case/1.fill-a-form-with-barcode-reading.html?ver=9.6.31&utm_source=github) -- Show result information on the video - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/4.use-case/3.show-result-texts-on-the-video.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/4.use-case/3.show-result-texts-on-the-video.html?ver=9.6.31&utm_source=github) -- Debug Camera and Collect Video Frame - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/debug.html?lang=js&&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.31/5.others/debug) +- Hello World - [Guide](#hello-world---simplest-implementation) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/1.hello-world/1.hello-world.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/1.hello-world.html?ver=9.6.32&utm_source=github) +- Angular App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-angular.html?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/1.hello-world/3.read-video-angular) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/3.read-video-angular/dist/hello-world/?ver=9.6.32&utm_source=github) +- React App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-reactjs.html?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/1.hello-world/4.read-video-react) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/4.read-video-react/build/?ver=9.6.32&utm_source=github) +- Vue App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-vuejsv3.html?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/1.hello-world/6.read-video-vue3) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/6.read-video-vue3/dist/?ver=9.6.32&utm_source=github) +- PWA App - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/helloworld-pwa.html?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/1.hello-world/10.read-video-pwa) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/1.hello-world/10.read-video-pwa/helloworld-pwa.html?ver=9.6.32&utm_source=github) +- WebView in Android and iOS - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v9.6.32/1.hello-world/14.read-video-webview) +- Read Driver Licenses - [Guide](https://www.dynamsoft.com/barcode-reader/docs/core/programming/usecases/scan-and-parse-AAMVA.html?ver=9.6.32&utm_source=github&&lang=js) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/4.use-case/2.read-a-drivers-license.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/4.use-case/2.read-a-drivers-license.html?ver=9.6.32&utm_source=github) +- Fill A Form - [Guide](https://www.dynamsoft.com/barcode-reader/docs/core/programming/usecases/scan-barcodes-as-input.html?lang=js&&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/4.use-case/1.fill-a-form-with-barcode-reading.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/4.use-case/1.fill-a-form-with-barcode-reading.html?ver=9.6.32&utm_source=github) +- Show result information on the video - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/main/4.use-case/3.show-result-texts-on-the-video.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/4.use-case/3.show-result-texts-on-the-video.html?ver=9.6.32&utm_source=github) +- Debug Camera and Collect Video Frame - [Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/debug.html?lang=js&&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v9.6.32/5.others/debug) You can also: -- Try the Official Demo - [Run](https://demo.dynamsoft.com/barcode-reader-js/?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-demo/) -- Try Online Examples - [Run](https://demo.dynamsoft.com/Samples/DBR/JS/index.html?ver=9.6.31&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v9.6.31/) +- Try the Official Demo - [Run](https://demo.dynamsoft.com/barcode-reader-js/?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-demo/) +- Try Online Examples - [Run](https://demo.dynamsoft.com/Samples/DBR/JS/index.html?ver=9.6.32&utm_source=github) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v9.6.32/) ## Hello World - Simplest Implementation @@ -67,9 +63,9 @@ The complete code of the "Hello World" example is shown below
- + + ``` - UNPKG ```html - + ``` #### Host the SDK yourself @@ -169,7 +165,7 @@ Options to download the SDK: - From the website - Download the JavaScript Package + Download the JavaScript Package - yarn @@ -186,7 +182,7 @@ Options to download the SDK: Depending on how you downloaded the SDK and how you intend to use it, you can typically include it like this: ```html - + ``` or @@ -228,7 +224,7 @@ The SDK requires a license to work, use the API `license` to specify a license k Dynamsoft.DBR.BarcodeScanner.license = "YOUR-LICENSE-KEY"; ``` -To test the SDK, you can request a 30-day trial license via the [customer portal](https://www.dynamsoft.com/customer/license/trialLicense?ver=9.6.31&utm_source=github&product=dbr&package=js). +To test the SDK, you can request a 30-day trial license via the [customer portal](https://www.dynamsoft.com/customer/license/trialLicense?ver=9.6.32&utm_source=github&product=dbr&package=js). > If you register a Dynamsoft account and download the SDK from the official website, Dynamsoft will automatically generate a 30-day trial license for you, and put the license key into all the samples attached to the SDK. @@ -240,7 +236,7 @@ The purpose is to tell the SDK where to find the engine files (\*.worker.js, \*. ```javascript //The following code uses the jsDelivr CDN, feel free to change it to your own location of these files -Dynamsoft.DBR.BarcodeScanner.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.31/dist/"; +Dynamsoft.DBR.BarcodeScanner.engineResourcePath = "https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@9.6.32/dist/"; ``` ### Interact with the SDK @@ -335,9 +331,9 @@ As you can see from the above code snippets, there are three types of configurat Try in [JSFiddle](https://jsfiddle.net/DynamsoftTeam/f24h8c1m/). - See also [settings samples](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/parameter-settings.html?ver=9.6.31&utm_source=github). + See also [settings samples](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/parameter-settings.html?ver=9.6.32&utm_source=github). -> Find the full list of the runtime settings here. +> Find the full list of the runtime settings here. ### Customize the UI (optional) @@ -421,8 +417,8 @@ The built-in UI of the `BarcodeScanner` object is defined in the file `dist/dbr. ```html ``` @@ -435,7 +431,7 @@ The built-in UI of the `BarcodeScanner` object is defined in the file `dist/dbr. ## API Documentation You can check out the detailed documentation about the APIs of the SDK at -[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=9.6.31](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=9.6.31). +[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=9.6.32](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=9.6.32). ## System Requirements @@ -456,7 +452,7 @@ DBR requires the following features to work: - `MediaDevices`/`getUserMedia` - This API is only required for in-browser video streaming. If a browser does not support this API, the [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeScanner.html?ver=9.6.31&utm_source=github#singleframemode) will be used automatically. If the API exists but doesn't work correctly, the Single Frame Mode can be used as an alternative way to access the camera. + This API is only required for in-browser video streaming. If a browser does not support this API, the [Single Frame Mode](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/BarcodeScanner.html?ver=9.6.32&utm_source=github#singleframemode) will be used automatically. If the API exists but doesn't work correctly, the Single Frame Mode can be used as an alternative way to access the camera. - `getSettings` @@ -481,7 +477,7 @@ Apart from the browsers, the operating systems may impose some limitations of th ## How to Upgrade -If you want to upgrade the SDK from an old version to a newer one, please see [how to upgrade](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/upgrade-guide/?ver=9.6.31&utm_source=github). +If you want to upgrade the SDK from an old version to a newer one, please see [how to upgrade](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/upgrade-guide/?ver=9.6.32&utm_source=github). ## Release Notes diff --git a/dist/dbr-9.6.31.browser.worker.js b/dist/dbr-9.6.32.browser.worker.js similarity index 99% rename from dist/dbr-9.6.31.browser.worker.js rename to dist/dbr-9.6.32.browser.worker.js index f29ce31..2031c10 100644 --- a/dist/dbr-9.6.31.browser.worker.js +++ b/dist/dbr-9.6.32.browser.worker.js @@ -4,7 +4,7 @@ * @website http://www.dynamsoft.com * @copyright Copyright 2023, Dynamsoft Corporation * @author Dynamsoft - * @version 9.6.31 (js 20230908) + * @version 9.6.32 (js 20231027) * @fileoverview Dynamsoft JavaScript Library for Barcode Reader * More info on DBR JS: https://www.dynamsoft.com/barcode-reader/sdk-javascript/ */ diff --git a/dist/dbr-9.6.31.full.wasm b/dist/dbr-9.6.32.full.wasm similarity index 83% rename from dist/dbr-9.6.31.full.wasm rename to dist/dbr-9.6.32.full.wasm index 98e14c0..afb396e 100644 Binary files a/dist/dbr-9.6.31.full.wasm and b/dist/dbr-9.6.32.full.wasm differ diff --git a/dist/dbr-9.6.31.full.wasm.js b/dist/dbr-9.6.32.full.wasm.js similarity index 100% rename from dist/dbr-9.6.31.full.wasm.js rename to dist/dbr-9.6.32.full.wasm.js diff --git a/dist/dbr-9.6.31.standby.full.wasm b/dist/dbr-9.6.32.standby.full.wasm similarity index 87% rename from dist/dbr-9.6.31.standby.full.wasm rename to dist/dbr-9.6.32.standby.full.wasm index b604280..5a2af63 100644 Binary files a/dist/dbr-9.6.31.standby.full.wasm and b/dist/dbr-9.6.32.standby.full.wasm differ diff --git a/dist/dbr-9.6.31.standby.full.wasm.js b/dist/dbr-9.6.32.standby.full.wasm.js similarity index 100% rename from dist/dbr-9.6.31.standby.full.wasm.js rename to dist/dbr-9.6.32.standby.full.wasm.js diff --git a/dist/dbr-9.6.31.standby.wasm b/dist/dbr-9.6.32.standby.wasm similarity index 94% rename from dist/dbr-9.6.31.standby.wasm rename to dist/dbr-9.6.32.standby.wasm index 256a6a4..62793c1 100644 Binary files a/dist/dbr-9.6.31.standby.wasm and b/dist/dbr-9.6.32.standby.wasm differ diff --git a/dist/dbr-9.6.31.standby.wasm.js b/dist/dbr-9.6.32.standby.wasm.js similarity index 100% rename from dist/dbr-9.6.31.standby.wasm.js rename to dist/dbr-9.6.32.standby.wasm.js diff --git a/dist/dbr-9.6.31.wasm b/dist/dbr-9.6.32.wasm similarity index 89% rename from dist/dbr-9.6.31.wasm rename to dist/dbr-9.6.32.wasm index 1210d5f..3d2b76c 100644 Binary files a/dist/dbr-9.6.31.wasm and b/dist/dbr-9.6.32.wasm differ diff --git a/dist/dbr-9.6.31.wasm.js b/dist/dbr-9.6.32.wasm.js similarity index 100% rename from dist/dbr-9.6.31.wasm.js rename to dist/dbr-9.6.32.wasm.js diff --git a/dist/dbr.js b/dist/dbr.js index a155330..22ebc22 100644 --- a/dist/dbr.js +++ b/dist/dbr.js @@ -4,18 +4,18 @@ * @website http://www.dynamsoft.com * @copyright Copyright 2023, Dynamsoft Corporation * @author Dynamsoft - * @version 9.6.31 (js 20230908) + * @version 9.6.32 (js 20231027) * @fileoverview Dynamsoft JavaScript Library for Barcode Reader * More info on DBR JS: https://www.dynamsoft.com/barcode-reader/sdk-javascript/ */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).Dynamsoft=e.Dynamsoft||{},e.Dynamsoft.DBR={}))}(this,(function(e){"use strict";const t="undefined"==typeof self,i=t?{}:self;let r,n,s,o,a;if("undefined"!=typeof navigator&&(r=navigator,n=r.userAgent,s=r.platform,o=r.mediaDevices),!t){const e={Edge:{search:"Edg",verSearch:"Edg"},OPR:null,Chrome:null,Safari:{str:r.vendor,search:"Apple",verSearch:["Version","iPhone OS","CPU OS"]},Firefox:null,Explorer:{search:"MSIE",verSearch:"MSIE"}},t={HarmonyOS:null,Android:null,iPhone:null,iPad:null,Windows:{str:s,search:"Win"},Mac:{str:s},Linux:{str:s}};let i="unknownBrowser",o=0,l="unknownOS";for(let t in e){const r=e[t]||{};let s=r.str||n,a=r.search||t,l=r.verStr||n,h=r.verSearch||t;if(h instanceof Array||(h=[h]),-1!=s.indexOf(a)){i=t;for(let e of h){let t=l.indexOf(e);if(-1!=t){o=parseFloat(l.substring(t+e.length+1));break}}break}}for(let e in t){const i=t[e]||{};let r=i.str||n,s=i.search||e;if(-1!=r.indexOf(s)){l=e;break}}"Linux"==l&&-1!=n.indexOf("Windows NT")&&(l="HarmonyOS"),a={browser:i,version:o,OS:l}}t&&(a={browser:"ssr",version:0,OS:"ssr"});const l="undefined"!=typeof WebAssembly&&n&&!(/Safari/.test(n)&&!/Chrome/.test(n)&&/\(.+\s11_2_([2-6]).*\)/.test(n)),h=!("undefined"==typeof Worker),c=!(!o||!o.getUserMedia),u=async()=>{let e=!1;if(c)try{(await o.getUserMedia({video:!0})).getTracks().forEach((e=>{e.stop()})),e=!0}catch(e){}return e};"Chrome"===a.browser&&a.version>66||"Safari"===a.browser&&a.version>13||"OPR"===a.browser&&a.version>43||"Edge"===a.browser&&a.version;const d=(()=>{if(!t&&document.currentScript){let e=document.currentScript.src,t=e.indexOf("?");if(-1!=t)e=e.substring(0,t);else{let t=e.indexOf("#");-1!=t&&(e=e.substring(0,t))}return e.substring(0,e.lastIndexOf("/")+1)}return"./"})(),f=" is not allowed to change after `createInstance` or `loadWasm` is called.",g=!t&&document.currentScript&&(document.currentScript.getAttribute("data-license")||document.currentScript.getAttribute("data-productKeys")||document.currentScript.getAttribute("data-licenseKey")||document.currentScript.getAttribute("data-handshakeCode")||document.currentScript.getAttribute("data-organizationID"))||"",_=!t&&document.currentScript&&document.currentScript.getAttribute("data-sessionPassword")||"",p=e=>{if(null==e)e=[];else{e=e instanceof Array?[...e]:[e];for(let i=0;i