You can call the APIs provided by the **Camera** module to develop a distributed camera that provides the basic camera functions such as shooting and video recording.
You can call the APIs provided by the **Camera** module to develop a distributed camera that provides the basic camera functions such as shooting and video recording.
## How to Develop
## How to Develop
Connect your calculator to a distributed device. Your calculator will call **getCameras()** to obtain the camera list and traverse the returned camera list to check **ConnctionType** of the **Camera** objects. If **ConnctionType** of a **Camera** object is **CAMERA_CONNECTION_REMOTE**, your calculator will use this object to create a **CameraInput** object. The subsequent call process is the same as that of the local camera development. For details about the local camera development, see [Camera Development](./camera.md).
Connect your calculator to a distributed device. Your calculator will call **getCameras()** to obtain the camera list and traverse the returned camera list to check **ConnectionType** of the **Camera** objects. If **ConnectionType** of a **Camera** object is **CAMERA_CONNECTION_REMOTE**, your calculator will use this object to create a **CameraInput** object. The subsequent call process is the same as that of the local camera development. For details about the local camera development, see [Camera Development](./camera.md).
For details about the APIs, see [Camera Management](../reference/apis/js-apis-camera.md).
For details about the APIs, see [Camera Management](../reference/apis/js-apis-camera.md).
@@ -8,7 +8,7 @@ Double-ended queue (deque) is a sequence container implemented based on the queu
...
@@ -8,7 +8,7 @@ Double-ended queue (deque) is a sequence container implemented based on the queu
**Queue** follows the principle of FIFO only and allows element removal at the front and insertion at the rear.
**Queue** follows the principle of FIFO only and allows element removal at the front and insertion at the rear.
**Vector** supports insertion and deletion of elements in between, as well asat both the ends. When compared with **Vector**, **Deque** is more efficient in inserting and removing header elements, but less efficient in accessing elements.
**Vector** supports insertion and deletion of elements in between, as well asat both the ends. When compared with **Vector**, **Deque** is more efficient in inserting and removing header elements, but less efficient in accessing elements.
**Recommended use case**: Use **Deque** when you need to frequently insert or remove elements at both the ends of a container.
**Recommended use case**: Use **Deque** when you need to frequently insert or remove elements at both the ends of a container.
@@ -1015,7 +1015,7 @@ Obtains the value of the specified key.
...
@@ -1015,7 +1015,7 @@ Obtains the value of the specified key.
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| V \| undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
| V \| undefined | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
**Example**
**Example**
```js
```js
...
@@ -1116,7 +1116,7 @@ Removes the specified key and its value from this buffer.
...
@@ -1116,7 +1116,7 @@ Removes the specified key and its value from this buffer.
| Type| Description|
| Type| Description|
| -------- | -------- |
| -------- | -------- |
| V \| undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|
| V \| undefined | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|