diff --git a/programming/javascript/user-guide/foundational-api.md b/programming/javascript/user-guide/foundational-api.md index e5020ce6..dd8b72f8 100644 --- a/programming/javascript/user-guide/foundational-api.md +++ b/programming/javascript/user-guide/foundational-api.md @@ -33,7 +33,7 @@ In this guide, you will learn step by step on how to integrate the DBR-JS SDK in Table of Contents -- [Barcode Reader for Your Website - User Guide](#barcode-reader-for-your-website---user-guide) +- [Barcode Reader for Your Website - Foundational API Guide](#barcode-reader-for-your-website---foundational-api-guide) - [Hello World - Simplest Implementation](#hello-world---simplest-implementation) - [Understand the code](#understand-the-code) - [About the code](#about-the-code) @@ -272,9 +272,6 @@ Besides using the public CDN, you can also download the SDK and host its files o ```sh npm i dynamsoft-barcode-reader-bundle@11.2.4000 -E - # Compared with using CDN, you need to set up more resources. - npm i dynamsoft-capture-vision-std@1.4.21 -E - npm i dynamsoft-image-processing@2.4.31 -E ``` The resources are located at the path `node_modules/`, without `@`. You must copy "dynamsoft-xxx" packages elsewhere and add `@`. The `` can be obtained from `package.json` of each package. Another thing to do is to [specify the engineResourcePaths](#2-optional-specify-the-location-of-the-engine-files) so that the SDK can correctly locate the resources. diff --git a/programming/javascript/user-guide/use-in-framework.md b/programming/javascript/user-guide/use-in-framework.md index 98397056..0e00ad6e 100644 --- a/programming/javascript/user-guide/use-in-framework.md +++ b/programming/javascript/user-guide/use-in-framework.md @@ -89,7 +89,7 @@ CoreModule.engineResourcePaths.rootDirectory = '../assets/dist'; > Note: > -> We recommend not renaming any module files within the `./dist` directory, as this may cause the rootDirectory configuration to not work properly. In such cases, you would need to define resource paths for each module individually. +> We recommend not renaming any module files within the `./dist` directory, as this may cause the rootDirectory configuration to not work properly. You can copy “dynamsoft-barcode-reader-bundle” package elsewhere and add `@`. The `` can be obtained from package.json > In our case the packages are used only as static resources, we recommend moving the `./dist` to a dedicated folder for static resources in your project to facilitate self-hosting. Next, we will demonstrate how to introduce `dynamsoft.config.ts` into a specific component. Don't skip the [Component for Reading Image](#component-for-reading-image) section even if you only need video barcode decoding. diff --git a/programming/javascript/user-guide/zip-guide.md b/programming/javascript/user-guide/zip-guide.md index 0ce8babc..15e39f75 100644 --- a/programming/javascript/user-guide/zip-guide.md +++ b/programming/javascript/user-guide/zip-guide.md @@ -1,27 +1,82 @@ -# Dynamsoft Barcode Reader JavaScript - Package Readme +# Dynamsoft Barcode Reader JavaScript - ZIP Package Guide Welcome! This package contains all resource files related to **Dynamsoft Barcode Reader JavaScript SDK**, and sample projects demonstrating how to use it. --- +## System Requirements + +### Secure Context (HTTPS Deployment) + +When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons: + +- Access to the camera video stream is only granted in a security context. Most browsers impose this restriction. +- Dynamsoft License requires a secure context to work. + +> Some browsers like Chrome may grant 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. + +### Browser Compatibility + +The following table is a list of supported browsers based on the above requirements: + +| Browser Name | Version | +| :----------: | :--------------: | +| Chrome | v78+1 | +| Firefox | v68+1 | +| Edge | v79+ | +| Safari | v14.5+ | + +1 Devices running iOS need to be on iOS 14.5+ for camera video streaming to work in Chrome, Firefox or other apps using webviews. + +Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK. + +--- + +## License + +Dynamsoft provides a complimentary trial license for the SDK. When you download the SDK package from the Dynamsoft website, after creating a Dynamsoft account, the following license will have a 30-day free trial: + +`DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9` + +>[!IMPORTANT] +> Once your trial license expires, the SDK will throw an error and cease to function. You can visit the Dynamsoft Customer Portal (https://www.dynamsoft.com/customer/license/trialLicense?product=dbr&utm_source=installer&package=js) to view your trial license details. Additionally, it's possible to extend the trial period via the customer portal, allowing for a total trial duration of 60 days. + +--- + +## Quick Start + +Double-click `samples/hello-world.html` to instantly see a fully functional web application that scans a single barcode using your device's camera! You can also try `samples/read-an-image.html` to decode barcodes from an image file. + +>[!NOTE] +> These samples load the SDK from a CDN so they can be opened directly as local files without a web server. An internet connection is required. To serve everything from the local `dist/` folder, see [Deploying to Your Server](#deploying-to-your-server). + +--- + ## How to Run the Samples -### 1. Unzip the Sample Files +### 1. Unzip the Package -After unzipping, you should see two folders: `dist`, which contains all the Barcode Reader JavaScript SDK resources, and `samples`, which includes subfolders for the individual sample projects. +After unzipping, you should see the following structure: + +- `dist/` — All Barcode Reader JavaScript SDK resources (`.js`, `.wasm`, worker files, etc.) +- `samples/` — Sample projects, including standalone examples (`hello-world.html`, `read-an-image.html`), framework integrations, and scenario demos +- `LICENSE` — Dynamsoft license terms +- `LEGAL.txt` — Third-party license notices ### 2. Open the Samples in a Browser -To explore the full set of available samples, open the `index.html` file in your browser. +To explore the full set of available samples, open the `samples/index.html` file in your browser. ->[!IMPORTANT] -> Some browsers block local file access for security reasons. To avoid these restrictions, run the samples through a local web server. +>[!NOTE] +> The included samples load from a CDN by default. To use the local `dist/` folder instead, a web server is required (the browser blocks local file fetches over `file:///`): +> - **Standalone & scenario samples**: Switch to the commented-out ` + + + + + +``` + +> When loading the SDK via a `