You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: programming/javascript/user-guide/index.md
+23-26Lines changed: 23 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -18,19 +18,18 @@ With the SDK integrated, your users can open your website in a browser, access t
18
18
In this guide, you will learn step by step on how to integrate the Dynamsoft Camera Enhancer SDK into your website.
19
19
20
20
-[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)
30
29
-[Hosting the SDK](#hosting-the-sdk)
31
30
-[Step One: Deploy the dist folder](#step-one-deploy-the-dist-folder)
32
31
-[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)
34
33
-[FAQ](#faq)
35
34
-[Can I open the web page directly from the hard drive?](#can-i-open-the-web-page-directly-from-the-hard-drive)
36
35
-[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
39
38
-[Release Notes](#release-notes)
40
39
-[Next Steps](#next-steps)
41
40
42
-
## Getting Started
41
+
## Adding the SDK
43
42
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:
47
44
48
45
1.`dynamsoft-camera-enhancer`: Required, it provides the camera related functionalities used in this guide.
49
46
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.
51
48
52
-
####Use a CDN
49
+
### Use a CDN
53
50
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/).
55
52
56
53
- jsDelivr
57
54
@@ -74,7 +71,7 @@ The simplest way to include the SDK is to use a CDN such as [jsDelivr](https://j
Besides using the CDN, you can also download the SDK and host it locally.
80
77
@@ -94,7 +91,7 @@ The following shows a few ways to download the SDK.
94
91
95
92
> Note: Upon installation of `dynamsoft-camera-enhancer`, a compatible versions of `dynamsoft-core` will be automatically installed if not installed already.
96
93
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:
@@ -103,9 +100,9 @@ Depending on how you downloaded the SDK and where you put it. You can typically
103
100
104
101
Read more on [how to host the SDK](#hosting-the-sdk).
105
102
106
-
### Use the SDK
103
+
##Using the SDK
107
104
108
-
#### Show live video stream on the page
105
+
###Stream live video
109
106
110
107
We can create a `CameraEnhancer` instance to open and show the video stream on the page. The following code snippet demonstrates the complete process:
111
108
@@ -133,7 +130,7 @@ We can create a `CameraEnhancer` instance to open and show the video stream on t
133
130
</script>
134
131
```
135
132
136
-
####Capture image frames from the video stream
133
+
### Capture image frames
137
134
138
135
There are two ways to capture image frames with Dynamsoft Camera Enhancer.
139
136
@@ -160,7 +157,7 @@ There are two ways to capture image frames with Dynamsoft Camera Enhancer.
160
157
cameraEnhancer.startFetching();
161
158
```
162
159
163
-
####Use ImageEditorView and the Drawing Logic
160
+
### Use ImageEditorView
164
161
165
162
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:
166
163
@@ -192,7 +189,7 @@ Once the rectangle appears on the image, you can click to select it and adjust i
192
189
193
190
Read more about [How to draw shapes](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/features/draw-shapes.html).
194
191
195
-
####Customize the UI
192
+
### Customize the UI
196
193
197
194
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.
198
195
@@ -275,9 +272,9 @@ Once you have downloaded the SDK, you can locate the "dist" directory and copy i
275
272
276
273
> 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.
277
274
278
-
### Step Three: Include the SDK from the server
275
+
### Step Three: Add the SDK from the server
279
276
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.
0 commit comments