Skip to content

Commit 20686a4

Browse files
Merge pull request #53 from dynamsoft-docs/preview
update to internal commit 56254d90
2 parents 184888f + a0a3cbd commit 20686a4

File tree

1 file changed

+23
-26
lines changed
  • programming/javascript/user-guide

1 file changed

+23
-26
lines changed

programming/javascript/user-guide/index.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ With the SDK integrated, your users can open your website in a browser, access t
1818
In this guide, you will learn step by step on how to integrate the Dynamsoft Camera Enhancer SDK into your website.
1919

2020
- [Dynamsoft Camera Enhancer for Your Website](#dynamsoft-camera-enhancer-for-your-website)
21-
- [Getting Started](#getting-started)
22-
- [Include the SDK](#include-the-sdk)
23-
- [Use a CDN](#use-a-cdn)
24-
- [Host the SDK yourself](#host-the-sdk-yourself)
25-
- [Use the SDK](#use-the-sdk)
26-
- [Show live video stream on the page](#show-live-video-stream-on-the-page)
27-
- [Capture image frames from the video stream](#capture-image-frames-from-the-video-stream)
28-
- [Use ImageEditorView and the Drawing Logic](#use-imageeditorview-and-the-drawing-logic)
29-
- [Customize the UI](#customize-the-ui)
21+
- [Adding the SDK](#adding-the-sdk)
22+
- [Use a CDN](#use-a-cdn)
23+
- [Host the SDK yourself](#host-the-sdk-yourself)
24+
- [Using the SDK](#using-the-sdk)
25+
- [Stream live video](#stream-live-video)
26+
- [Capture image frames](#capture-image-frames)
27+
- [Use ImageEditorView](#use-imageeditorview)
28+
- [Customize the UI](#customize-the-ui)
3029
- [Hosting the SDK](#hosting-the-sdk)
3130
- [Step One: Deploy the dist folder](#step-one-deploy-the-dist-folder)
3231
- [Step Two: Configure the Server](#step-two-configure-the-server)
33-
- [Step Three: Include the SDK from the server](#step-three-include-the-sdk-from-the-server)
32+
- [Step Three: Add the SDK from the server](#step-three-add-the-sdk-from-the-server)
3433
- [FAQ](#faq)
3534
- [Can I open the web page directly from the hard drive?](#can-i-open-the-web-page-directly-from-the-hard-drive)
3635
- [Why can't I use my camera?](#why-cant-i-use-my-camera)
@@ -39,19 +38,17 @@ In this guide, you will learn step by step on how to integrate the Dynamsoft Cam
3938
- [Release Notes](#release-notes)
4039
- [Next Steps](#next-steps)
4140

42-
## Getting Started
41+
## Adding the SDK
4342

44-
### Include the SDK
45-
46-
To use the SDK, we first include the following packages:
43+
To use the SDK, we first add the following packages:
4744

4845
1. `dynamsoft-camera-enhancer`: Required, it provides the camera related functionalities used in this guide.
4946
2. `dynamsoft-core`: Required, it includes basic classes, interfaces, and enumerations that are shared between all Dynamsoft SDKs.
50-
3. `dynamsoft-license`: Optional, if you wish to utilize advanced features such as auto-zoom, enhanced focus, and tap-to-focus, you will need to include it.
47+
3. `dynamsoft-license`: Optional, if you wish to utilize advanced features such as auto-zoom, enhanced focus, and tap-to-focus, you will need it.
5148

52-
#### Use a CDN
49+
### Use a CDN
5350

54-
The simplest way to include the SDK is to use a CDN such as [jsDelivr](https://jsdelivr.com/) or [UNPKG](https://unpkg.com/).
51+
The simplest way to add the SDK is to use a CDN such as [jsDelivr](https://jsdelivr.com/) or [UNPKG](https://unpkg.com/).
5552

5653
- jsDelivr
5754

@@ -74,7 +71,7 @@ The simplest way to include the SDK is to use a CDN such as [jsDelivr](https://j
7471
>- [https://download2.dynamsoft.com/packages/dynamsoft-license@3.2.21/dist/license.js](https://download2.dynamsoft.com/packages/dynamsoft-license@3.2.10/dist/license.js)
7572
>- [https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.3/dist/dce.js](https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.2/dist/dce.js)
7673
77-
#### Host the SDK yourself
74+
### Host the SDK yourself
7875

7976
Besides using the CDN, you can also download the SDK and host it locally.
8077

@@ -94,7 +91,7 @@ The following shows a few ways to download the SDK.
9491

9592
> Note: Upon installation of `dynamsoft-camera-enhancer`, a compatible versions of `dynamsoft-core` will be automatically installed if not installed already.
9693
97-
Depending on how you downloaded the SDK and where you put it. You can typically include it like this:
94+
Depending on how you downloaded the SDK and where you put it. You can typically add it like this:
9895

9996
```html
10097
<script src="./node_modules/dynamsoft-core/dist/core.js"></script>
@@ -103,9 +100,9 @@ Depending on how you downloaded the SDK and where you put it. You can typically
103100

104101
Read more on [how to host the SDK](#hosting-the-sdk).
105102

106-
### Use the SDK
103+
## Using the SDK
107104

108-
#### Show live video stream on the page
105+
### Stream live video
109106

110107
We can create a `CameraEnhancer` instance to open and show the video stream on the page. The following code snippet demonstrates the complete process:
111108

@@ -133,7 +130,7 @@ We can create a `CameraEnhancer` instance to open and show the video stream on t
133130
</script>
134131
```
135132

136-
#### Capture image frames from the video stream
133+
### Capture image frames
137134

138135
There are two ways to capture image frames with Dynamsoft Camera Enhancer.
139136

@@ -160,7 +157,7 @@ There are two ways to capture image frames with Dynamsoft Camera Enhancer.
160157
cameraEnhancer.startFetching();
161158
```
162159

163-
#### Use ImageEditorView and the Drawing Logic
160+
### Use ImageEditorView
164161

165162
The other view class ImageEditorView is designed to show a single image. The following code snippet shows a single frame in an `ImageEditorView` instance and draws a rectangle on the image:
166163

@@ -192,7 +189,7 @@ Once the rectangle appears on the image, you can click to select it and adjust i
192189

193190
Read more about [How to draw shapes](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/features/draw-shapes.html).
194191

195-
#### Customize the UI
192+
### Customize the UI
196193

197194
The built-in UI of the `CameraView` instance is defined in the file `dist/dce.ui.html`. You can copy the file `dist/dce.ui.html` to your project, modify it and pass its path in the API `createInstance` to set it as the default UI.
198195

@@ -275,9 +272,9 @@ Once you have downloaded the SDK, you can locate the "dist" directory and copy i
275272

276273
> For convenience, self-signed certificates can be used during development and testing. You can also use "http://localhost" which allows camera access without an SSL certificate.
277274
278-
### Step Three: Include the SDK from the server
275+
### Step Three: Add the SDK from the server
279276

280-
Now that the SDK is hosted on your server, you can include it accordingly.
277+
Now that the SDK is hosted on your server, you can add it accordingly.
281278

282279
```html
283280
<script src="https://www.yourwebsite.com/PATH-TO-THE-SDK/dynamsoft-camera-enhancer/dist/dce.js"></script>

0 commit comments

Comments
 (0)