提交 21b3eded 编写于 作者: G Gloria

update docs against 7864

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 a3104368
# Distributed Camera Development
## When to Use
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
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).
For details about the APIs, see [Camera Management](../reference/apis/js-apis-camera.md).
### Connecting to a Distributed Camera
Connect the calculator and the distributed device to the same LAN.
Open the calculator and click the arrow icon in the upper right corner. A new window is displayed. Enter the verification code as prompted, and the calculator will be connected to the distributed device.
### Creating an Instance
```js
import camera from '@ohos.multimedia.camera'
import image from '@ohos.multimedia.image'
import media from '@ohos.multimedia.media'
import featureAbility from '@ohos.ability.featureAbility'
// Create a CameraManager object.
let cameraManager
await camera.getCameraManager(globalThis.Context, (err, manager) => {
if (err) {
console.error('Failed to get the CameraManager instance ${err.message}');
return;
}
console.log('Callback returned with the CameraManager instance');
cameraManager = manager
})
// Register a callback to listen for camera status changes and obtain the updated camera status information.
cameraManager.on('cameraStatus', (cameraStatusInfo) => {
console.log('camera : ' + cameraStatusInfo.camera.cameraId);
console.log('status: ' + cameraStatusInfo.status);
})
// Obtain the camera list.
let cameraArray
let remoteCamera
await cameraManager.getCameras((err, cameras) => {
if (err) {
console.error('Failed to get the cameras. ${err.message}');
return;
}
console.log('Callback returned with an array of supported cameras: ' + cameras.length);
cameraArray = cameras
})
for(let cameraIndex = 0; cameraIndex < cameraArray.length; cameraIndex) {
console.log('cameraId : ' + cameraArray[cameraIndex].cameraId) // Obtain the camera ID.
console.log('cameraPosition : ' + cameraArray[cameraIndex].cameraPosition) // Obtain the camera position.
console.log('cameraType : ' + cameraArray[cameraIndex].cameraType) // Obtain the camera type.
console.log('connectionType : ' + cameraArray[cameraIndex].connectionType) // Obtain the camera connection type.
if (cameraArray[cameraIndex].connectionType == CAMERA_CONNECTION_REMOTE) {
remoteCamera = cameraArray[cameraIndex].cameraId
}
}
// Create a camera input stream.
let cameraInput
await cameraManager.createCameraInput(remoteCamera).then((input) => {
console.log('Promise returned with the CameraInput instance');
cameraInput = input
})
```
For details about the subsequent steps, see [Camera Development](./camera.md).
...@@ -21,7 +21,7 @@ Obtains a **CameraManager** instance. This API uses an asynchronous callback to ...@@ -21,7 +21,7 @@ Obtains a **CameraManager** instance. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------- | ---- | ---------------------------------- | | -------- | ----------------------------------------------- | ---- | ---------------------------- |
| context | Context | Yes | Application context. | | context | Context | Yes | Application context. |
| callback | AsyncCallback<[CameraManager](#cameramanager)\> | Yes | Callback used to return the **CameraManager** instance.| | callback | AsyncCallback<[CameraManager](#cameramanager)\> | Yes | Callback used to return the **CameraManager** instance.|
...@@ -54,7 +54,7 @@ Obtains a **CameraManager** instance. This API uses a promise to return the resu ...@@ -54,7 +54,7 @@ Obtains a **CameraManager** instance. This API uses a promise to return the resu
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------- | ----------------------------------------- | | ----------------------------------------- | ----------------------------------- |
| Promise<[CameraManager](#cameramanager)\> | Promise used to return the **CameraManager** instance.| | Promise<[CameraManager](#cameramanager)\> | Promise used to return the **CameraManager** instance.|
**Example** **Example**
...@@ -72,21 +72,21 @@ Enumerates the camera statuses. ...@@ -72,21 +72,21 @@ Enumerates the camera statuses.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------------------- | ---- | -------------- | | ------------------------- | ---- | ------------ |
| CAMERA_STATUS_APPEAR | 0 | A camera appears.| | CAMERA_STATUS_APPEAR | 0 | A camera appears. |
| CAMERA_STATUS_DISAPPEAR | 1 | The camera disappears. | | CAMERA_STATUS_DISAPPEAR | 1 | The camera disappears.|
| CAMERA_STATUS_AVAILABLE | 2 | The camera is available. | | CAMERA_STATUS_AVAILABLE | 2 | The camera is available. |
| CAMERA_STATUS_UNAVAILABLE | 3 | The camera is unavailable. | | CAMERA_STATUS_UNAVAILABLE | 3 | The camera is unavailable.|
## Profile ## Profile
Defines the camera configuration. Defines the camera profile.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Read only| Description | | Name | Type | Read only| Description |
| ------ | ----------------------------- | ---- | ---------- | | -------- | ----------------------------- |---- | ------------- |
| format | [CameraFormat](#cameraformat) | Yes | Output format.| | format | [CameraFormat](#cameraformat) | Yes | Output format. |
| size | [Size](#size) | Yes | Resolution. | | size | [Size](#size) | Yes | Resolution. |
## FrameRateRange ## FrameRateRange
...@@ -95,20 +95,20 @@ Defines the camera configuration. ...@@ -95,20 +95,20 @@ Defines the camera configuration.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name| Type | Read only| Description | | Name | Type | Read only| Description |
| ---- | ------ | ---- | ----------------- | | ------------------------- | ------ | ---- | ------------------- |
| min | number | Yes | Minimum rate, in fps.| | min | number | Yes | Minimum rate, in fps. |
| max | number | Yes | Maximum rate, in fps.| | max | number | Yes | Maximum rate, in fps. |
## VideoProfile ## VideoProfile
Defines the video configuration. Defines the video profile.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Read only| Description | | Name | Type | Read only| Description |
| --------------- | --------------------------------- | ---- | ------ | | ------------------------- | ----------------------------------------- | --- |------------ |
| frameRateRanges | [FrameRateRange](#frameraterange) | Yes | Frame rate range.| | frameRateRanges | [FrameRateRange](#frameraterange) | Yes | Frame rate range. |
## CameraOutputCapability ## CameraOutputCapability
...@@ -117,10 +117,10 @@ Defines the camera output capability. ...@@ -117,10 +117,10 @@ Defines the camera output capability.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Read only| Description | | Name | Type | Read only| Description |
| ---------------------------- | ------------------------------------------------- | ---- | -------------------------- | | ----------------------------- | -------------------------------------------------- | --- |------------------- |
| previewProfiles | Array<[Profile](#profile)\> | Yes | Supported preview configurations. | | previewProfiles | Array<[Profile](#profile)\> | Yes | Supported preview profiles. |
| photoProfiles | Array<[Profile](#profile)\> | Yes | Supported shooting configurations. | | photoProfiles | Array<[Profile](#profile)\> | Yes | Supported shooting profiles. |
| videoProfiles | Array<[VideoProfile](#videoprofile)\> | Yes | Supported video recording configurations. | | videoProfiles | Array<[VideoProfile](#videoprofile)\> | Yes | Supported video recording profiles. |
| supportedMetadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types.| | supportedMetadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types.|
## CameraManager ## CameraManager
...@@ -138,7 +138,7 @@ Obtains supported cameras. This API uses an asynchronous callback to return the ...@@ -138,7 +138,7 @@ Obtains supported cameras. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------------ | | -------- | ----------------------------------------------------- | ---- | ------------------------------- |
| callback | AsyncCallback<Array<[CameraDevice](#cameradevice)\>\> | Yes | Callback used to return the array of supported cameras.| | callback | AsyncCallback<Array<[CameraDevice](#cameradevice)\>\> | Yes | Callback used to return the array of supported cameras.|
**Example** **Example**
...@@ -164,7 +164,7 @@ Obtains supported cameras. This API uses a promise to return the result. ...@@ -164,7 +164,7 @@ Obtains supported cameras. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------------- | ----------------------------- | | ----------------------------------------------- | ------------------------- |
| Promise<Array<[CameraDevice](#cameradevice)\>\> | Promise used to return the array of supported cameras.| | Promise<Array<[CameraDevice](#cameradevice)\>\> | Promise used to return the array of supported cameras.|
...@@ -187,9 +187,9 @@ Obtains the output capability supported by a camera. This API uses an asynchrono ...@@ -187,9 +187,9 @@ Obtains the output capability supported by a camera. This API uses an asynchrono
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | ---------------------------------- | | -------- | ---------------------------------------------------------------- | -- | -------------------------- |
| camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object. | | camera | [CameraDevice](#cameradevice) | Yes| **CameraDevice** object. |
| callback | AsyncCallback<[CameraOutputCapability](#cameraoutputcapability)\> | Yes | Callback used to return the output capability.| | callback | AsyncCallback<[CameraOutputCapability](#cameraoutputcapability)\> | Yes| Callback used to return the output capability.|
**Example** **Example**
...@@ -213,14 +213,14 @@ Obtains the output capability supported by a camera. This API uses a promise to ...@@ -213,14 +213,14 @@ Obtains the output capability supported by a camera. This API uses a promise to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| ------ | ----------------------------- | ---- | ------------------ | | -------- | --------------------------------- | ---- | ---------- |
| camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object.| | camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------------------------- | --------------------------------------------- | | -------------------------------------------------------------- | ----------------------------- |
| Promise<[CameraOutputCapability](#cameraoutputcapability)\> | Promise used to return the output capability.| | Promise<[CameraOutputCapability](#cameraoutputcapability)\> | Promise used to return the output capability.|
...@@ -236,15 +236,15 @@ cameraManager.getSupportedOutputCapability(cameraDevice).then((cameraoutputcapab ...@@ -236,15 +236,15 @@ cameraManager.getSupportedOutputCapability(cameraDevice).then((cameraoutputcapab
getSupportedMetadataObjectType(callback: AsyncCallback<Array<MetadataObjectType\>\>): void getSupportedMetadataObjectType(callback: AsyncCallback<Array<MetadataObjectType\>\>): void
Obtains the metadata information supported by this camera. This API uses an asynchronous callback to return the result. Obtains the metadata object types supported by this camera. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | -------------------------------------------- | | -------- | ---------------------------------------------------------------- | -- | -------------------------- |
| callback | AsyncCallback<Array<[MetadataObjectType](#metadataobject)\>\> | Yes | Callback used to return the metadata information.| | callback | AsyncCallback<Array<[MetadataObjectType](#metadataobject)\>\> | Yes| Callback used to return the metadata object types.|
**Example** **Example**
...@@ -262,15 +262,15 @@ cameraManager.getSupportedMetadataObjectType((err, metadataobject) => { ...@@ -262,15 +262,15 @@ cameraManager.getSupportedMetadataObjectType((err, metadataobject) => {
getSupportedMetadataObjectType(camera:CameraDevice): Promise<CameraOutputCapability\> getSupportedMetadataObjectType(camera:CameraDevice): Promise<CameraOutputCapability\>
Obtains the metadata information supported by this camera. This API uses a promise to return the result. Obtains the metadata object types supported by this camera. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------------------- | ----------------------------------------------------- | | -------------------------------------------------------------- | ----------------------------- |
| Promise<Array<[MetadataObjectType](#metadataobject)\>\> | Promise used to return the metadata information.| | Promise<Array<[MetadataObjectType](#metadataobject)\>\> | Promise used to return the metadata object types.|
**Example** **Example**
...@@ -292,7 +292,7 @@ Checks whether this camera is muted. This API uses an asynchronous callback to r ...@@ -292,7 +292,7 @@ Checks whether this camera is muted. This API uses an asynchronous callback to r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------------------------- | | -------- | ---------------------------------------- | ---- | ------------------------------------ |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. The value **true** means that the camera is muted, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. The value **true** means that the camera is muted, and **false** means the opposite.|
**Example** **Example**
...@@ -318,8 +318,8 @@ Checks whether this camera is muted. This API uses a promise to return the resul ...@@ -318,8 +318,8 @@ Checks whether this camera is muted. This API uses a promise to return the resul
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | --------------------------------------------------- | | ------------------------------------ | --------------------------------------------- |
| Promise<boolean\> | Promise used to return the result. The value **true** means that the camera is muted, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the result. The value **true** means that the camera is muted, and **false** means the opposite. |
**Example** **Example**
...@@ -345,8 +345,8 @@ This is a system API. ...@@ -345,8 +345,8 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------------- | | -------- | --------------------------------------- | ---- | ------------------------------------ |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. The value **true** means that the camera can be muted, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. The value **true** means that the camera can be muted, and **false** means the opposite. |
**Example** **Example**
...@@ -375,7 +375,7 @@ This is a system API. ...@@ -375,7 +375,7 @@ This is a system API.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ------------------------------------------------------- | | --------------------- | ----------------------------- |
| Promise<boolean\> | Promise used to return the result. The value **true** means that the camera can be muted, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the result. The value **true** means that the camera can be muted, and **false** means the opposite.|
...@@ -401,8 +401,8 @@ This is a system API. ...@@ -401,8 +401,8 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ------------------------------------ | | -------- | ----------------------------------------- | ---- | ------------------------------------ |
| mute | boolean | Yes | Whether to mute the camera. The value **true** means to mute the camera, and **false** means the opposite. | | mute | boolean | Yes | Whether to mute the camera. The value **true** means to mute the camera, and **false** means the opposite. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -432,15 +432,15 @@ This is a system API. ...@@ -432,15 +432,15 @@ This is a system API.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---- | ------- | ---- | -------------- | | -------- | ----------------------------------------- | ---- | ------------ |
| mute | boolean | Yes | Whether to mute the camera. The value **true** means to mute the camera, and **false** means the opposite.| | mute | boolean | Yes | Whether to mute the camera. The value **true** means to mute the camera, and **false** means the opposite. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------------------------------- | | ----------------------------------- | ----------------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -466,9 +466,9 @@ This is a system API. ...@@ -466,9 +466,9 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------- | ---- | ----------------------------------- | | -------- | ------------------------------------------- | ---- | --------------------------------- |
| camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object. | | camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object. |
| callback | AsyncCallback<[CameraInput](#camerainput)\> | Yes | Callback used to return the **CameraInput** instance.| | callback | AsyncCallback<[CameraInput](#camerainput)\> | Yes | Callback used to return the **CameraInput** instance. |
**Example** **Example**
...@@ -497,13 +497,13 @@ This is a system API. ...@@ -497,13 +497,13 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------ | ----------------------------- | ---- | ------------------ | | -------- | ----------------------------- | ---- | ---------- |
| camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object.| | camera | [CameraDevice](#cameradevice) | Yes | **CameraDevice** object.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------- | ---------------------------------------- | | ------------------------------------- | ------------------------------------ |
| Promise<[CameraInput](#camerainput)\> | Promise used to return the **CameraInput** instance.| | Promise<[CameraInput](#camerainput)\> | Promise used to return the **CameraInput** instance.|
**Example** **Example**
...@@ -529,10 +529,10 @@ This is a system API. ...@@ -529,10 +529,10 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------- | ---- | ----------------------------------- | | -------- | ------------------------------------------- | ---- | --------------------------------- |
| position | [CameraPosition](#cameraposition) | Yes | Camera position. | | position | [CameraPosition](#cameraposition) | Yes | Camera position. |
| type | [CameraType](#cameratype) | Yes | Camera type. | | type | [CameraType](#cameratype) | Yes | Camera type. |
| callback | AsyncCallback<[CameraInput](#camerainput)\> | Yes | Callback used to return the **CameraInput** instance.| | callback | AsyncCallback<[CameraInput](#camerainput)\> | Yes | Callback used to return the **CameraInput** instance. |
**Example** **Example**
...@@ -561,14 +561,14 @@ This is a system API. ...@@ -561,14 +561,14 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------- | ---- | ---------- | | -------- | --------------------------------- | ---- | ------------ |
| position | [CameraPosition](#cameraposition) | Yes | Camera position.| | position | [CameraPosition](#cameraposition) | Yes | Camera position. |
| type | [CameraType](#cameratype) | Yes | Camera type.| | type | [CameraType](#cameratype) | Yes | Camera type. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------- | ---------------------------------------- | | ------------------------------------- | ------------------------------------ |
| Promise<[CameraInput](#camerainput)\> | Promise used to return the **CameraInput** instance.| | Promise<[CameraInput](#camerainput)\> | Promise used to return the **CameraInput** instance.|
**Example** **Example**
...@@ -590,10 +590,10 @@ Creates a **PreviewOutput** instance. This API uses an asynchronous callback to ...@@ -590,10 +590,10 @@ Creates a **PreviewOutput** instance. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | ----------------------------------------------- | ---- | ------------------------------- |
| profile | [Profile](#profile) | Yes | Supported preview configurations. | | profile | [Profile](#profile) | Yes | Supported preview profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)** or **[ImageReceiver](js-apis-image.md#imagereceiver9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)** or **[ImageReceiver](js-apis-image.md#imagereceiver9)**.|
| callback | AsyncCallback<[PreviewOutput](#previewoutput)\> | Yes | Callback used to return the **PreviewOutput** instance. | | callback | AsyncCallback<[PreviewOutput](#previewoutput)\> | Yes | Callback used to return the **PreviewOutput** instance.|
**Example** **Example**
...@@ -618,15 +618,15 @@ Creates a **PreviewOutput** instance. This API uses a promise to return the resu ...@@ -618,15 +618,15 @@ Creates a **PreviewOutput** instance. This API uses a promise to return the resu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | -------- | ---------------------------------| ---- | ----------------- |
| profile | [Profile](#profile) | Yes | Supported preview configurations. | | profile | [Profile](#profile) | Yes | Supported preview profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)** or **[ImageReceiver](js-apis-image.md#imagereceiver9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)** or **[ImageReceiver](js-apis-image.md#imagereceiver9)**.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------- | ------------------------------------------ | | ---------------------------------------- | ---------------------------------------- |
| Promise<[PreviewOutput](#previewoutput)\> | Promise used to return the **PreviewOutput** instance.| | Promise<[PreviewOutput](#previewoutput)\> | Promise used to return the **PreviewOutput** instance. |
**Example** **Example**
...@@ -647,9 +647,9 @@ Creates a **PreviewOutput** instance without a surface ID. This API uses an asyn ...@@ -647,9 +647,9 @@ Creates a **PreviewOutput** instance without a surface ID. This API uses an asyn
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------- | ---- | ------------------------------------- | | -------- | ----------------------------------------------- | ---- | --------------------------------- |
| profile | [Profile](#profile) | Yes | Supported preview configurations. | | profile | [Profile](#profile) | Yes | Supported preview profile. |
| callback | AsyncCallback<[PreviewOutput](#previewoutput)\> | Yes | Callback used to return the **PreviewOutput** instance.| | callback | AsyncCallback<[PreviewOutput](#previewoutput)\> | Yes | Callback used to return the **PreviewOutput** instance. |
**Example** **Example**
...@@ -673,14 +673,14 @@ Creates a **PreviewOutput** instance without a surface ID. This API uses a promi ...@@ -673,14 +673,14 @@ Creates a **PreviewOutput** instance without a surface ID. This API uses a promi
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| ------- | ------------------- | ---- | -------------------- | | -------- | ---------------------------------| ---- | ---------- |
| profile | [Profile](#profile) | Yes | Supported preview configurations.| | profile | [Profile](#profile) | Yes | Supported preview profile. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------- | ------------------------------------------ | | ----------------------------------------- | --------------------------------------- |
| Promise<[PreviewOutput](#previewoutput)\> | Promise used to return the **PreviewOutput** instance.| | Promise<[PreviewOutput](#previewoutput)\> | Promise used to return the **PreviewOutput** instance.|
**Example** **Example**
...@@ -702,9 +702,9 @@ Creates a **PhotoOutput** instance. This API uses an asynchronous callback to re ...@@ -702,9 +702,9 @@ Creates a **PhotoOutput** instance. This API uses an asynchronous callback to re
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------------- | ---- | ----------------------------------- |
| profile | [Profile](#profile) | Yes | Supported shooting configurations. | | profile | [Profile](#profile) | Yes | Supported shooting profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[ImageReceiver](js-apis-image.md#imagereceiver9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[ImageReceiver](js-apis-image.md#imagereceiver9)**.|
| callback | AsyncCallback<[PhotoOutput](#photooutput)\> | Yes | Callback used to return the **PhotoOutput** instance. | | callback | AsyncCallback<[PhotoOutput](#photooutput)\> | Yes | Callback used to return the **PhotoOutput** instance. |
**Example** **Example**
...@@ -730,15 +730,15 @@ Creates a **PhotoOutput** instance. This API uses a promise to return the result ...@@ -730,15 +730,15 @@ Creates a **PhotoOutput** instance. This API uses a promise to return the result
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------- | ---- | ------------------------------------------------------------ | | -------- | ---------------------------------| ---- | ----------- |
| profile | [Profile](#profile) | Yes | Supported shooting configurations. | | profile | [Profile](#profile) | Yes | Supported shooting profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[ImageReceiver](js-apis-image.md#imagereceiver9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[ImageReceiver](js-apis-image.md#imagereceiver9)**.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------- | ---------------------------------------- | | ------------------------------------- | -------------------------------------- |
| Promise<[PhotoOutput](#photooutput)\> | Promise used to return the **PhotoOutput** instance.| | Promise<[PhotoOutput](#photooutput)\> | Promise used to return the **PhotoOutput** instance. |
**Example** **Example**
...@@ -759,10 +759,10 @@ Creates a **VideoOutput** instance. This API uses an asynchronous callback to re ...@@ -759,10 +759,10 @@ Creates a **VideoOutput** instance. This API uses an asynchronous callback to re
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | ------------------------------------------- | ---- | ------------------------------ |
| profile | [VideoProfile](#videoprofile) | Yes | Supported video recording configurations. | | profile | [VideoProfile](#videoprofile) | Yes | Supported video recording profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[VideoRecorder](js-apis-media.md#videorecorder9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[VideoRecorder](js-apis-media.md#videorecorder9)**.|
| callback | AsyncCallback<[VideoOutput](#videooutput)\> | Yes | Callback used to return the **VideoOutput** instance. | | callback | AsyncCallback<[VideoOutput](#videooutput)\> | Yes | Callback used to return the **VideoOutput** instance.|
**Example** **Example**
...@@ -787,15 +787,15 @@ Creates a **VideoOutput** instance. This API uses a promise to return the result ...@@ -787,15 +787,15 @@ Creates a **VideoOutput** instance. This API uses a promise to return the result
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------------- | ---- | ------------------------------------------------------------ | | -------- | ---------------------------------| ---- | ---------- |
| profile | [VideoProfile](#videoprofile) | Yes | Supported video recording configurations. | | profile | [VideoProfile](#videoprofile) | Yes | Supported video recording profile. |
| surfaceId | string | Yes | Surface ID, which is obtained from **[VideoRecorder](js-apis-media.md#videorecorder9)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[VideoRecorder](js-apis-media.md#videorecorder9)**.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------- | ---------------------------------------- | | ------------------------------------- | -------------------------------------- |
| Promise<[VideoOutput](#videooutput)\> | Promise used to return the **VideoOutput** instance.| | Promise<[VideoOutput](#videooutput)\> | Promise used to return the **VideoOutput** instance. |
**Example** **Example**
...@@ -816,9 +816,9 @@ Creates a **MetadataOutput** instance. This API uses an asynchronous callback to ...@@ -816,9 +816,9 @@ Creates a **MetadataOutput** instance. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------------- | ---- | -------------------------------------- | | -------------------- | -------------------------------------------------- | --- | ---------------------------- |
| metadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types. | | metadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types. |
| callback | AsyncCallback<[MetadataOutput](#metadataoutput)\> | Yes | Callback used to return the **MetadataOutput** instance.| | callback | AsyncCallback<[MetadataOutput](#metadataoutput)\> | Yes | Callback used to return the **MetadataOutput** instance. |
**Example** **Example**
...@@ -843,13 +843,13 @@ Creates a **MetadataOutput** instance. This API uses a promise to return the res ...@@ -843,13 +843,13 @@ Creates a **MetadataOutput** instance. This API uses a promise to return the res
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------------- | ------------------------------------------------- | ---- | ---------------- | | -------------------- | -------------------------------------------------- | --- | -------------- |
| metadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types.| | metadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Supported metadata object types.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------- | ------------------------------------------- | | ------------------------------------------ | ----------------------------------------- |
| Promise<[MetadataOutput](#metadataoutput)\> | Promise used to return the **MetadataOutput** instance.| | Promise<[MetadataOutput](#metadataoutput)\> | Promise used to return the **MetadataOutput** instance.|
**Example** **Example**
...@@ -870,8 +870,8 @@ Creates a **CaptureSession** instance. This API uses an asynchronous callback to ...@@ -870,8 +870,8 @@ Creates a **CaptureSession** instance. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| -------- | ------------------------------------------------- | ---- | -------------------------------- | | -------------------- | ----------------------------------------- | ----------- | ---------------------------- |
| callback | AsyncCallback<[CaptureSession](#capturesession)\> | Yes | Callback used to return the **CaptureSession** instance.| | callback | AsyncCallback<[CaptureSession](#capturesession)\> | Yes | Callback used to return the **CaptureSession** instance.|
**Example** **Example**
...@@ -897,7 +897,7 @@ Creates a **CaptureSession** instance. This API uses a promise to return the res ...@@ -897,7 +897,7 @@ Creates a **CaptureSession** instance. This API uses a promise to return the res
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------------------------- | ------------------------------------------- | | ------------------------------------------- | ---------------------------------------- |
| Promise<[CaptureSession](#capturesession)\> | Promise used to return the **CaptureSession** instance.| | Promise<[CaptureSession](#capturesession)\> | Promise used to return the **CaptureSession** instance.|
**Example** **Example**
...@@ -919,8 +919,8 @@ Listens for camera status changes. This API uses an asynchronous callback to ret ...@@ -919,8 +919,8 @@ Listens for camera status changes. This API uses an asynchronous callback to ret
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ---------------------------------------------------- | | -------- | ----------------------------------------------------- | ---- | --------- |
| type | string | Yes | Event type. The value is fixed at **cameraStatus**, indicating the camera status change event.| | type | string | Yes | Event type. The value is fixed at **'cameraStatus'**, indicating the camera status change event.|
| callback | AsyncCallback<[CameraStatusInfo](#camerastatusinfo)\> | Yes | Callback used to return the camera status change. | | callback | AsyncCallback<[CameraStatusInfo](#camerastatusinfo)\> | Yes | Callback used to return the camera status change. |
**Example** **Example**
...@@ -951,8 +951,8 @@ This is a system API. ...@@ -951,8 +951,8 @@ This is a system API.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------------------------------ | | -------- | --------------------------------------- | ---- | ------------------------------- |
| type | string | Yes | Event type. The value is fixed at **cameraMute**, indicating the camera mute status change event.| | type | string | Yes | Event type. The value is fixed at **'cameraMute'**, indicating the camera mute status change event.|
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the camera mute status. | | callback | AsyncCallback<boolean\> | Yes | Callback used to return the camera mute status. |
**Example** **Example**
...@@ -985,8 +985,8 @@ Enumerates the camera positions. ...@@ -985,8 +985,8 @@ Enumerates the camera positions.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| --------------------------- | ---- | ---------------- | | --------------------------- | ---- | -------------- |
| CAMERA_POSITION_UNSPECIFIED | 0 | Unspecified position.| | CAMERA_POSITION_UNSPECIFIED | 0 | Unspecified position. |
| CAMERA_POSITION_BACK | 1 | Rear camera. | | CAMERA_POSITION_BACK | 1 | Rear camera. |
| CAMERA_POSITION_FRONT | 2 | Front camera. | | CAMERA_POSITION_FRONT | 2 | Front camera. |
...@@ -997,7 +997,7 @@ Enumerates the camera types. ...@@ -997,7 +997,7 @@ Enumerates the camera types.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ----------------------- | ---- | ------------------ | | ----------------------- | ---- | -------------- |
| CAMERA_TYPE_UNSPECIFIED | 0 | Unspecified camera type. | | CAMERA_TYPE_UNSPECIFIED | 0 | Unspecified camera type. |
| CAMERA_TYPE_WIDE_ANGLE | 1 | Wide camera. | | CAMERA_TYPE_WIDE_ANGLE | 1 | Wide camera. |
| CAMERA_TYPE_ULTRA_WIDE | 2 | Ultra wide camera. | | CAMERA_TYPE_ULTRA_WIDE | 2 | Ultra wide camera. |
...@@ -1011,9 +1011,9 @@ Enumerates the camera connection types. ...@@ -1011,9 +1011,9 @@ Enumerates the camera connection types.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ---------------------------- | ---- | ---------------- | | ---------------------------- | ---- | ------------- |
| CAMERA_CONNECTION_BUILT_IN | 0 | Built-in camera. | | CAMERA_CONNECTION_BUILT_IN | 0 | Built-in camera. |
| CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB. | | CAMERA_CONNECTION_USB_PLUGIN | 1 | Camera connected using USB.|
| CAMERA_CONNECTION_REMOTE | 2 | Remote camera.| | CAMERA_CONNECTION_REMOTE | 2 | Remote camera.|
## CameraDevice ## CameraDevice
...@@ -1023,11 +1023,11 @@ Defines the camera device information. ...@@ -1023,11 +1023,11 @@ Defines the camera device information.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Read only| Description | | Name | Type | Read only| Description |
| -------------- | --------------------------------- | ---- | ---------------- | | -------------- | --------------------------------- | ---- | ---------- |
| cameraId | string | Yes | **CameraDevice** object.| | cameraId | string | Yes | **CameraDevice** object.|
| cameraPosition | [CameraPosition](#cameraposition) | Yes | Camera position. | | cameraPosition | [CameraPosition](#cameraposition) | Yes | Camera position. |
| cameraType | [CameraType](#cameratype) | Yes | Camera type. | | cameraType | [CameraType](#cameratype) | Yes | Camera type. |
| connectionType | [ConnectionType](#connectiontype) | Yes | Camera connection type. | | connectionType | [ConnectionType](#connectiontype) | Yes | Camera connection type.|
**Example** **Example**
...@@ -1050,9 +1050,9 @@ Enumerates the camera output capability. ...@@ -1050,9 +1050,9 @@ Enumerates the camera output capability.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ------ | ------ | ---- | ---- | ------------------ | | ------ | ------ | ---- | ---- | ------------ |
| height | number | Yes | Yes | Image height, in pixels.| | height | number | Yes | Yes | Image height, in pixels.|
| width | number | Yes | Yes | Image width, in pixel.| | width | number | Yes | Yes | Image width, in pixels.|
## Point ## Point
...@@ -1060,20 +1060,20 @@ Enumerates the point coordinates, which are used for focus and exposure configur ...@@ -1060,20 +1060,20 @@ Enumerates the point coordinates, which are used for focus and exposure configur
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name| Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| ---- | ------ | ---- | ----------- | | ------ | ------ | ---- | ------------ |
| x | number | Yes | X coordinate of a point.| | x | number | Yes | X coordinate of a point. |
| y | number | Yes | Y coordinate of a point.| | y | number | Yes | Y coordinate of a point. |
## CameraFormat ## CameraFormat
Enumerates the camera output format. Enumerates the camera output formats.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Default Value| Description | | Name | Default Value | Description |
| ------------------------ | ------ | ---------------------- | | ----------------------- | --------- | ------------ |
| CAMERA_FORMAT_YUV_420_SP | 1003 | YUV 420 SP image.| | CAMERA_FORMAT_YUV_420_SP| 1003 | YUV 420 SP image. |
| CAMERA_FORMAT_JPEG | 2000 | JPEG image. | | CAMERA_FORMAT_JPEG | 2000 | JPEG image. |
## CameraInput ## CameraInput
...@@ -1091,7 +1091,7 @@ Opens this camera. This API uses an asynchronous callback to return the result. ...@@ -1091,7 +1091,7 @@ Opens this camera. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1117,7 +1117,7 @@ Opens this camera. This API uses a promise to return the result. ...@@ -1117,7 +1117,7 @@ Opens this camera. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1139,7 +1139,7 @@ Closes this camera. This API uses an asynchronous callback to return the result. ...@@ -1139,7 +1139,7 @@ Closes this camera. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1165,7 +1165,7 @@ Closes this camera. This API uses a promise to return the result. ...@@ -1165,7 +1165,7 @@ Closes this camera. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1187,7 +1187,7 @@ Releases this camera. This API uses an asynchronous callback to return the resul ...@@ -1187,7 +1187,7 @@ Releases this camera. This API uses an asynchronous callback to return the resul
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1213,7 +1213,7 @@ Releases this camera. This API uses a promise to return the result. ...@@ -1213,7 +1213,7 @@ Releases this camera. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1235,8 +1235,8 @@ Listens for **CameraInput** errors. This API uses a callback to return the resul ...@@ -1235,8 +1235,8 @@ Listens for **CameraInput** errors. This API uses a callback to return the resul
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ------------------------------------------------ | | -------- | -------------------------------- | ---- | ------------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **error**, indicating the camera input error event.| | type | string | Yes | Event type. The value is fixed at **'error'**, indicating the camera input error event.|
| callback | ErrorCallback<[CameraInputError](#camerainputerror)\> | Yes | Callback used to return the result. | | callback | ErrorCallback<[CameraInputError](#camerainputerror)\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -1254,10 +1254,10 @@ Enumerates the error codes used for camera input. ...@@ -1254,10 +1254,10 @@ Enumerates the error codes used for camera input.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------------------- | ---- | -------------- | | ------------------------- | ---- | ---------- |
| ERROR_UNKNOWN | -1 | Unknown error. | | ERROR_UNKNOWN | -1 | Unknown error.|
| ERROR_NO_PERMISSION | 0 | You do not have the required permission. | | ERROR_NO_PERMISSION | 0 | You do not have the required permission.|
| ERROR_DEVICE_PREEMPTED | 1 | The camera is preempted. | | ERROR_DEVICE_PREEMPTED | 1 | The camera is preempted.|
| ERROR_DEVICE_DISCONNECTED | 2 | The camera is disconnected.| | ERROR_DEVICE_DISCONNECTED | 2 | The camera is disconnected.|
| ERROR_DEVICE_IN_USE | 3 | The camera is in use.| | ERROR_DEVICE_IN_USE | 3 | The camera is in use.|
| ERROR_DRIVER_ERROR | 4 | Driver error. | | ERROR_DRIVER_ERROR | 4 | Driver error. |
...@@ -1269,7 +1269,7 @@ Defines an error object used for **[CameraInput](#camerainput)**. ...@@ -1269,7 +1269,7 @@ Defines an error object used for **[CameraInput](#camerainput)**.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name| Type | Description | | Name| Type | Description |
| ---- | --------------------------------------------- | ----------------------- | | ---- | --------------------------------------------- | --------------------- |
| code | [CameraInputErrorCode](#camerainputerrorcode) | **CameraInput** error code.| | code | [CameraInputErrorCode](#camerainputerrorcode) | **CameraInput** error code.|
...@@ -1280,7 +1280,7 @@ Enumerates the flash modes. ...@@ -1280,7 +1280,7 @@ Enumerates the flash modes.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ---------------------- | ---- | ------------ | | ---------------------- | ---- | ---------- |
| FLASH_MODE_CLOSE | 0 | The flash is off.| | FLASH_MODE_CLOSE | 0 | The flash is off.|
| FLASH_MODE_OPEN | 1 | The flash is on.| | FLASH_MODE_OPEN | 1 | The flash is on.|
| FLASH_MODE_AUTO | 2 | The flash mode is auto, indicating that the flash fires automatically depending on the shooting conditions.| | FLASH_MODE_AUTO | 2 | The flash mode is auto, indicating that the flash fires automatically depending on the shooting conditions.|
...@@ -1293,7 +1293,7 @@ Enumerates the exposure modes. ...@@ -1293,7 +1293,7 @@ Enumerates the exposure modes.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ----------------------------- | ---- | -------------- | | ----------------------------- | ---- | ----------- |
| EXPOSURE_MODE_LOCKED | 0 | Exposure locked.| | EXPOSURE_MODE_LOCKED | 0 | Exposure locked.|
| EXPOSURE_MODE_AUTO | 1 | Auto exposure.| | EXPOSURE_MODE_AUTO | 1 | Auto exposure.|
| EXPOSURE_MODE_CONTINUOUS_AUTO | 2 | Continuous auto exposure.| | EXPOSURE_MODE_CONTINUOUS_AUTO | 2 | Continuous auto exposure.|
...@@ -1305,7 +1305,7 @@ Enumerates the focus modes. ...@@ -1305,7 +1305,7 @@ Enumerates the focus modes.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| -------------------------- | ---- | -------------- | | -------------------------- | ---- | ------------ |
| FOCUS_MODE_MANUAL | 0 | Manual focus. | | FOCUS_MODE_MANUAL | 0 | Manual focus. |
| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Continuous auto focus.| | FOCUS_MODE_CONTINUOUS_AUTO | 1 | Continuous auto focus.|
| FOCUS_MODE_AUTO | 2 | Auto focus. | | FOCUS_MODE_AUTO | 2 | Auto focus. |
...@@ -1318,7 +1318,7 @@ Enumerates the focus states. ...@@ -1318,7 +1318,7 @@ Enumerates the focus states.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| --------------------- | ---- | ------------ | | --------------------- | ---- | --------- |
| FOCUS_STATE_SCAN | 0 | Focusing. | | FOCUS_STATE_SCAN | 0 | Focusing. |
| FOCUS_STATE_FOCUSED | 1 | Focused. | | FOCUS_STATE_FOCUSED | 1 | Focused. |
| FOCUS_STATE_UNFOCUSED | 2 | Unfocused.| | FOCUS_STATE_UNFOCUSED | 2 | Unfocused.|
...@@ -1330,7 +1330,7 @@ Enumerates the exposure states. ...@@ -1330,7 +1330,7 @@ Enumerates the exposure states.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------------------ | ---- | ---------- | | ------------------------- | ---- | -------- |
| EXPOSURE_STATE_SCAN | 0 | Exposing. | | EXPOSURE_STATE_SCAN | 0 | Exposing. |
| EXPOSURE_STATE_CONVERGED | 1 | Exposure converged.| | EXPOSURE_STATE_CONVERGED | 1 | Exposure converged.|
...@@ -1341,11 +1341,11 @@ Enumerates the video stabilization modes. ...@@ -1341,11 +1341,11 @@ Enumerates the video stabilization modes.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------ | ---- | ---------------------------------------------------- | | --------- | ---- | ------------ |
| OFF | 0 | Video stabilization is disabled. | | OFF | 0 | Video stabilization is disabled. |
| LOW | 1 | The basic video stabilization algorithm is used. | | LOW | 1 | The basic video stabilization algorithm is used. |
| MIDDLE | 2 | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used. | | MIDDLE | 2 | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used. |
| HIGH | 3 | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used.| | HIGH | 3 | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used. |
| AUTO | 4 | Automatic video stabilization is used. | | AUTO | 4 | Automatic video stabilization is used. |
## CaptureSession ## CaptureSession
...@@ -1363,7 +1363,7 @@ Starts configuration for this **CaptureSession** instance. This API uses an asyn ...@@ -1363,7 +1363,7 @@ Starts configuration for this **CaptureSession** instance. This API uses an asyn
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1389,7 +1389,7 @@ Starts configuration for this **CaptureSession** instance. This API uses a promi ...@@ -1389,7 +1389,7 @@ Starts configuration for this **CaptureSession** instance. This API uses a promi
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
...@@ -1412,7 +1412,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses an ...@@ -1412,7 +1412,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses an
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1438,7 +1438,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses a ...@@ -1438,7 +1438,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses a
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1460,7 +1460,7 @@ Checks whether a **[CameraInput](#camerainput)** instance can be added to this * ...@@ -1460,7 +1460,7 @@ Checks whether a **[CameraInput](#camerainput)** instance can be added to this *
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.|
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. | | callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. |
...@@ -1487,13 +1487,13 @@ Checks whether a **[CameraInput](#camerainput)** instance can be added to this * ...@@ -1487,13 +1487,13 @@ Checks whether a **[CameraInput](#camerainput)** instance can be added to this *
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | --------------------------- | | -------------- | -------------------------- |
| Promise<boolean\> | Promise used to return the result.| | Promise<boolean\> | Promise used to return the result.|
**Example** **Example**
...@@ -1515,7 +1515,7 @@ Adds a **[CameraInput](#camerainput)** instance to this **CaptureSession**. This ...@@ -1515,7 +1515,7 @@ Adds a **[CameraInput](#camerainput)** instance to this **CaptureSession**. This
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -1542,13 +1542,13 @@ Adds a **[CameraInput](#camerainput)** instance to this **CaptureSession**. This ...@@ -1542,13 +1542,13 @@ Adds a **[CameraInput](#camerainput)** instance to this **CaptureSession**. This
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to add.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1570,7 +1570,7 @@ Removes a **[CameraInput](#camerainput)** instance from this **CaptureSession**. ...@@ -1570,7 +1570,7 @@ Removes a **[CameraInput](#camerainput)** instance from this **CaptureSession**.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to remove.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to remove.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -1597,13 +1597,13 @@ Removes a **[CameraInput](#camerainput)** instance from this **CaptureSession**. ...@@ -1597,13 +1597,13 @@ Removes a **[CameraInput](#camerainput)** instance from this **CaptureSession**.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | --------------------------- | | ----------- | --------------------------- | ---- | ------------------------ |
| cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to remove.| | cameraInput | [CameraInput](#camerainput) | Yes | **CameraInput** instance to remove.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| --------------- | --------------------------- | | -------------- | ------------------------- |
| Promise\<void\> | Promise used to return the result.| | Promise\<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -1625,7 +1625,7 @@ Checks whether a **[CameraOutput](#cameraoutput)** instance can be added to this ...@@ -1625,7 +1625,7 @@ Checks whether a **[CameraOutput](#cameraoutput)** instance can be added to this
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------- |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.|
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. | | callback | AsyncCallback<boolean\> | Yes | Callback used to return the result. |
...@@ -1652,14 +1652,14 @@ Checks whether a **[CameraOutput](#cameraoutput)** instance can be added to this ...@@ -1652,14 +1652,14 @@ Checks whether a **[CameraOutput](#cameraoutput)** instance can be added to this
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------- |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | --------------------------- | | -------------- | --------------------------- |
| Promise<boolean\> | Promise used to return the result.| | Promise<boolean\> | Promise used to return the result.|
...@@ -1682,7 +1682,7 @@ Adds a **[CameraOutput](#cameraoutput)** instance to this **CaptureSession**. Th ...@@ -1682,7 +1682,7 @@ Adds a **[CameraOutput](#cameraoutput)** instance to this **CaptureSession**. Th
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------ |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -1709,13 +1709,13 @@ Adds a **[CameraOutput](#cameraoutput)** instance to this **CaptureSession**. Th ...@@ -1709,13 +1709,13 @@ Adds a **[CameraOutput](#cameraoutput)** instance to this **CaptureSession**. Th
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------- |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to add.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1737,7 +1737,7 @@ Removes a **[CameraOutput](#cameraoutput)** instance from this **CaptureSession* ...@@ -1737,7 +1737,7 @@ Removes a **[CameraOutput](#cameraoutput)** instance from this **CaptureSession*
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------ |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to remove.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to remove.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -1764,14 +1764,14 @@ Removes a **[CameraOutput](#cameraoutput)** instance from this **CaptureSession* ...@@ -1764,14 +1764,14 @@ Removes a **[CameraOutput](#cameraoutput)** instance from this **CaptureSession*
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ----------------------------- | ---- | ---------------------------- | | ------------- | ------------------------------- | ---- | ------------------------- |
| cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to remove.| | cameraOutput | [CameraOutput](#cameraoutput) | Yes | **CameraOutput** instance to remove.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
...@@ -1794,7 +1794,7 @@ Starts this **CaptureSession**. This API uses an asynchronous callback to return ...@@ -1794,7 +1794,7 @@ Starts this **CaptureSession**. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1820,7 +1820,7 @@ Starts this **CaptureSession**. This API uses a promise to return the result. ...@@ -1820,7 +1820,7 @@ Starts this **CaptureSession**. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1842,7 +1842,7 @@ Stops this **CaptureSession**. This API uses an asynchronous callback to return ...@@ -1842,7 +1842,7 @@ Stops this **CaptureSession**. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1868,7 +1868,7 @@ Stops this **CaptureSession**. This API uses a promise to return the result. ...@@ -1868,7 +1868,7 @@ Stops this **CaptureSession**. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1883,14 +1883,14 @@ captureSession.stop().then(() => { ...@@ -1883,14 +1883,14 @@ captureSession.stop().then(() => {
lockForControl(callback: AsyncCallback<void\>): void lockForControl(callback: AsyncCallback<void\>): void
Requests to exclusively control the hardware attributes **[CameraInput](#camerainput)** of the camera device. This API uses an asynchronous callback to return the result. After the exclusive control is complete, you must call **[unlockForControl](#unlockforcontrol)** to release the lock. Requests to exclusively control the hardware attributes **[CameraInput](#camerainput)** of the camera device. This API uses an asynchronous callback to return the result. After the exclusive control is complete, you must call **[unlockForControl](#unlockforcontrol)** to release the exclusive control.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1909,14 +1909,14 @@ captureSession.lockForControl((err) => { ...@@ -1909,14 +1909,14 @@ captureSession.lockForControl((err) => {
lockForControl(): Promise<void\> lockForControl(): Promise<void\>
Requests to exclusively control the hardware attributes **[CameraInput](#camerainput)** of the camera device. This API uses a promise to return the result. After the exclusive control is complete, you must call **[unlockForControl](#unlockforcontrol)** to release the lock. Requests to exclusively control the hardware attributes **[CameraInput](#camerainput)** of the camera device. This API uses a promise to return the result. After the exclusive control is complete, you must call **[unlockForControl](#unlockforcontrol)** to release the exclusive control.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1938,7 +1938,7 @@ Releases the exclusive control on the device configuration. This API uses an asy ...@@ -1938,7 +1938,7 @@ Releases the exclusive control on the device configuration. This API uses an asy
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -1964,7 +1964,7 @@ Releases the exclusive control on the device configuration. This API uses a prom ...@@ -1964,7 +1964,7 @@ Releases the exclusive control on the device configuration. This API uses a prom
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -1986,7 +1986,7 @@ Releases this **CaptureSession**. This API uses an asynchronous callback to retu ...@@ -1986,7 +1986,7 @@ Releases this **CaptureSession**. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -2012,7 +2012,7 @@ Releases this **CaptureSession**. This API uses a promise to return the result. ...@@ -2012,7 +2012,7 @@ Releases this **CaptureSession**. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -2027,15 +2027,15 @@ captureSession.release().then(() => { ...@@ -2027,15 +2027,15 @@ captureSession.release().then(() => {
hasFlash(callback: AsyncCallback<boolean\>): void hasFlash(callback: AsyncCallback<boolean\>): void
Checks whether the device has flash light. This API uses an asynchronous callback to return the result. Checks whether the device has flash. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------- | | -------- | ----------------------- | ---- | -------------------------------- |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the flash light support status. The value **true** means that the device has flash light.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the flash support status. The value **true** means that the device has flash.|
**Example** **Example**
...@@ -2053,15 +2053,15 @@ cameraInput.hasFlash((err, status) => { ...@@ -2053,15 +2053,15 @@ cameraInput.hasFlash((err, status) => {
hasFlash(): Promise<boolean\> hasFlash(): Promise<boolean\>
Checks whether the device has flash light. This API uses a promise to return the result. Checks whether the device has flash. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ------------------------------------------------------- | | ----------------- | ----------------------------------------------- |
| Promise<boolean\> | Promise used to return the flash light support status. The value **true** means that the device has flash light.| | Promise<boolean\> | Promise used to return the flash support status. The value **true** means that the device has flash.|
**Example** **Example**
...@@ -2082,7 +2082,7 @@ Checks whether a specified flash mode is supported. This API uses an asynchronou ...@@ -2082,7 +2082,7 @@ Checks whether a specified flash mode is supported. This API uses an asynchronou
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------- | ---- | ---------------------------------------- | | --------- | ----------------------- | ---- | --------------------------------- |
| flashMode | [FlashMode](#flashmode) | Yes | Flash mode. | | flashMode | [FlashMode](#flashmode) | Yes | Flash mode. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the flash mode support status. The value **true** means that the flash mode is supported, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the flash mode support status. The value **true** means that the flash mode is supported, and **false** means the opposite.|
...@@ -2109,13 +2109,13 @@ Checks whether a specified flash mode is supported. This API uses a promise to r ...@@ -2109,13 +2109,13 @@ Checks whether a specified flash mode is supported. This API uses a promise to r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------- | ---- | ---------------- | | --------- | ----------------------- | ---- | ------------- |
| flashMode | [FlashMode](#flashmode) | Yes | Flash mode.| | flashMode | [FlashMode](#flashmode) | Yes | Flash mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ------------------------------------------------------------ | | ----------------- | ---------------------------------------------------- |
| Promise<boolean\> | Promise used to return the flash mode support status. The value **true** means that the flash mode is supported, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the flash mode support status. The value **true** means that the flash mode is supported, and **false** means the opposite.|
**Example** **Example**
...@@ -2134,7 +2134,7 @@ Sets the flash mode. This API uses an asynchronous callback to return the result ...@@ -2134,7 +2134,7 @@ Sets the flash mode. This API uses an asynchronous callback to return the result
Before the setting, do the following checks: Before the setting, do the following checks:
1. Use **[hasFlash](#hasflash)** to check whether the device has flash light. 1. Use **[hasFlash](#hasflash)** to check whether the device has flash.
2. Use **[isFlashModeSupported](#isflashmodesupported)** to check whether the device supports the flash mode. 2. Use **[isFlashModeSupported](#isflashmodesupported)** to check whether the device supports the flash mode.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
...@@ -2142,7 +2142,7 @@ Before the setting, do the following checks: ...@@ -2142,7 +2142,7 @@ Before the setting, do the following checks:
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------- | ---- | ------------------------ | | --------- | ----------------------- | ---- | --------------------- |
| flashMode | [FlashMode](#flashmode) | Yes | Flash mode. | | flashMode | [FlashMode](#flashmode) | Yes | Flash mode. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2166,7 +2166,7 @@ Sets a flash mode. This API uses a promise to return the result. ...@@ -2166,7 +2166,7 @@ Sets a flash mode. This API uses a promise to return the result.
Before the setting, do the following checks: Before the setting, do the following checks:
1. Use **[hasFlash](#hasflash)** to check whether the device has flash light. 1. Use **[hasFlash](#hasflash)** to check whether the device has flash.
2. Use **[isFlashModeSupported](#isflashmodesupported)** to check whether the device supports the flash mode. 2. Use **[isFlashModeSupported](#isflashmodesupported)** to check whether the device supports the flash mode.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
...@@ -2174,13 +2174,13 @@ Before the setting, do the following checks: ...@@ -2174,13 +2174,13 @@ Before the setting, do the following checks:
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ----------------------- | ---- | ---------------- | | --------- | ----------------------- | ---- | ------------- |
| flashMode | [FlashMode](#flashmode) | Yes | Flash mode.| | flashMode | [FlashMode](#flashmode) | Yes | Flash mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -2202,7 +2202,7 @@ Obtains the flash mode in use. This API uses an asynchronous callback to return ...@@ -2202,7 +2202,7 @@ Obtains the flash mode in use. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | ---------------------------------------- | | -------- | --------------------------------------- | ---- | --------------------------------- |
| callback | AsyncCallback<[FlashMode](#flashmode)\> | Yes | Callback used to return the flash mode.| | callback | AsyncCallback<[FlashMode](#flashmode)\> | Yes | Callback used to return the flash mode.|
**Example** **Example**
...@@ -2228,7 +2228,7 @@ Obtains the flash mode in use. This API uses a promise to return the result. ...@@ -2228,7 +2228,7 @@ Obtains the flash mode in use. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| --------------------------------- | --------------------------------------- | | --------------------------------- | --------------------------------- |
| Promise<[FlashMode](#flashmode)\> | Promise used to return the flash mode.| | Promise<[FlashMode](#flashmode)\> | Promise used to return the flash mode.|
**Example** **Example**
...@@ -2249,8 +2249,8 @@ Checks whether a specified exposure mode is supported. This API uses an asynchro ...@@ -2249,8 +2249,8 @@ Checks whether a specified exposure mode is supported. This API uses an asynchro
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| -------- | ----------------------------- | ---- | ------------------------------------ | | -------- | -------------------------------| ---- | ----------------------------- |
| aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode. | | aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the exposure mode support status. The value **true** means that the exposure mode is supported, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the exposure mode support status. The value **true** means that the exposure mode is supported, and **false** means the opposite.|
...@@ -2276,14 +2276,14 @@ Checks whether a specified exposure mode is supported. This API uses a promise t ...@@ -2276,14 +2276,14 @@ Checks whether a specified exposure mode is supported. This API uses a promise t
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory | Description |
| ------ | ----------------------------- | ---- | ---------- | | -------- | -------------------------------| ---- | ----------------------------- |
| aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode.| | aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode. |
**Return value** **Return value**
| Name | Description | | Name | Description |
| ----------------- | ------------------------------------- | | ----------------- |--------------------------------- |
| Promise<boolean\> | Promise used to return the exposure mode support status. The value **true** means that the exposure mode is supported, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the exposure mode support status. The value **true** means that the exposure mode is supported, and **false** means the opposite.|
**Example** **Example**
...@@ -2305,7 +2305,7 @@ Obtains the exposure mode in use. This API uses an asynchronous callback to retu ...@@ -2305,7 +2305,7 @@ Obtains the exposure mode in use. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------- | ---- | -------------------------------- | | -------- | -------------------------------| ---- | ---------------------------------------- |
| callback | AsyncCallback<[ExposureMode](#exposuremode)\> | Yes | Callback used to return the exposure mode.| | callback | AsyncCallback<[ExposureMode](#exposuremode)\> | Yes | Callback used to return the exposure mode.|
**Example** **Example**
...@@ -2331,7 +2331,7 @@ Obtains the exposure mode in use. This API uses a promise to return the result. ...@@ -2331,7 +2331,7 @@ Obtains the exposure mode in use. This API uses a promise to return the result.
**Return value** **Return value**
| Name | Description | | Name | Description |
| --------------------------------------- | ----------------------------------- | | --------------------------------------- |------------------------------- |
| Promise<[ExposureMode](#exposuremode)\> | Promise used to return the exposure mode.| | Promise<[ExposureMode](#exposuremode)\> | Promise used to return the exposure mode.|
**Example** **Example**
...@@ -2353,7 +2353,7 @@ Sets an exposure mode. This API uses an asynchronous callback to return the resu ...@@ -2353,7 +2353,7 @@ Sets an exposure mode. This API uses an asynchronous callback to return the resu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------- | ---- | ---------------------------- | | -------- | -------------------------------| ---- | ----------------------- |
| aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode. | | aeMode | [ExposureMode](#exposuremode) | Yes | Exposure mode. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2380,8 +2380,8 @@ Sets an exposure mode. This API uses a promise to return the result. ...@@ -2380,8 +2380,8 @@ Sets an exposure mode. This API uses a promise to return the result.
**Return value** **Return value**
| Name | Description | | Name | Description |
| -------------- | ------------------------------- | | ----------------- |---------------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -2402,8 +2402,8 @@ Obtains the center of the metering area. This API uses an asynchronous callback ...@@ -2402,8 +2402,8 @@ Obtains the center of the metering area. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------- | ---- | ------------------------------ | | -------- | -------------------------------| ---- | ------------------------ |
| callback | AsyncCallback<[Point](#point)\> | Yes | Callback used to return the center of the metering area.| | callback | AsyncCallback<[Point](#point)\>| Yes | Callback used to return the center of the metering area.|
**Example** **Example**
...@@ -2428,7 +2428,7 @@ Obtains the center of the metering area. This API uses a promise to return the r ...@@ -2428,7 +2428,7 @@ Obtains the center of the metering area. This API uses a promise to return the r
**Return value** **Return value**
| Name | Description | | Name | Description |
| ------------------------- | --------------------------------- | | ------------------------- |----------------------------- |
| Promise<[Point](#point)\> | Promise used to return the center of the metering area.| | Promise<[Point](#point)\> | Promise used to return the center of the metering area.|
**Example** **Example**
...@@ -2450,7 +2450,7 @@ Sets the center of the metering area. This API uses an asynchronous callback to ...@@ -2450,7 +2450,7 @@ Sets the center of the metering area. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------- | -------------------- | ---- | ------------------------ | | ------------- | -------------------------------| ---- | ------------------- |
| exposurePoint | [Point](#point) | Yes | Exposure point. | | exposurePoint | [Point](#point) | Yes | Exposure point. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2479,14 +2479,14 @@ Sets the center of the metering area. This API uses a promise to return the resu ...@@ -2479,14 +2479,14 @@ Sets the center of the metering area. This API uses a promise to return the resu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------- | --------------- | ---- | -------- | | ------------- | -------------------------------| ---- | ------------------- |
| exposurePoint | [Point](#point) | Yes | Exposure point.| | exposurePoint | [Point](#point) | Yes | Exposure point. |
**Return value** **Return value**
| Name | Description | | Name | Description |
| -------------- | --------------------------- | | ----------------- |------------------------ |
| Promise<void\>| Promise used to return the center of the metering area.| | Promise<void\> | Promise used to return the center of the metering area.|
**Example** **Example**
...@@ -2509,7 +2509,7 @@ Obtains the exposure compensation values. This API uses an asynchronous callback ...@@ -2509,7 +2509,7 @@ Obtains the exposure compensation values. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------ | ---- | ---------------------------------- | | -------- | -------------------------------| ---- | ----------------------------- |
| callback | AsyncCallback<Array<number\>\> | Yes | Callback used to return the array of compensation values.| | callback | AsyncCallback<Array<number\>\> | Yes | Callback used to return the array of compensation values.|
**Example** **Example**
...@@ -2535,7 +2535,7 @@ Obtains the exposure compensation values. This API uses a promise to return the ...@@ -2535,7 +2535,7 @@ Obtains the exposure compensation values. This API uses a promise to return the
**Return value** **Return value**
| Name | Description | | Name | Description |
| ------------------------ | ----------------------------------- | | ----------------- |-------------------------------------- |
| Promise<Array<number\>\> | Promise used to return the array of compensation values.| | Promise<Array<number\>\> | Promise used to return the array of compensation values.|
**Example** **Example**
...@@ -2559,7 +2559,7 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure ...@@ -2559,7 +2559,7 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | -------------------- | ---- | ------------------------ | | -------- | -------------------------------| ---- | ------------------- |
| exposureBias | number | Yes | Compensation value. | | exposureBias | number | Yes | Compensation value. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2588,14 +2588,14 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure ...@@ -2588,14 +2588,14 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------------ | ------ | ---- | ---------- | | -------------- | --------- | ---- | --------- |
| exposureBias | number | Yes | Compensation value.| | exposureBias | number | Yes | Compensation value. |
**Return value** **Return value**
| Name | Description | | Name | Description |
| -------------- | --------------------------- | | ----------------- |------------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -2616,7 +2616,7 @@ Obtains the exposure value in use. This API uses an asynchronous callback to ret ...@@ -2616,7 +2616,7 @@ Obtains the exposure value in use. This API uses an asynchronous callback to ret
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | -------------------------- | | -------- | ------------------------| ---- | --------------------- |
| callback | AsyncCallback<number\> | Yes | Callback used to the exposure value.| | callback | AsyncCallback<number\> | Yes | Callback used to the exposure value.|
**Example** **Example**
...@@ -2642,7 +2642,7 @@ Obtains the exposure value in use. This API uses a promise to return the result. ...@@ -2642,7 +2642,7 @@ Obtains the exposure value in use. This API uses a promise to return the result.
**Return value** **Return value**
| Name | Description | | Name | Description |
| ---------------- | ----------------------------- | | ----------------- |-------------------------- |
| Promise<number\> | Promise used to the exposure value.| | Promise<number\> | Promise used to the exposure value.|
**Example** **Example**
...@@ -2664,7 +2664,7 @@ Checks whether a specified focus mode is supported. This API uses an asynchronou ...@@ -2664,7 +2664,7 @@ Checks whether a specified focus mode is supported. This API uses an asynchronou
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | -------------------------------------- | | -------- | ----------------------- | ---- | -------------------------------- |
| afMode | [FocusMode](#focusmode) | Yes | Focus mode. | | afMode | [FocusMode](#focusmode) | Yes | Focus mode. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the focus mode support status. The value **true** means that the focus mode is supported, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the focus mode support status. The value **true** means that the focus mode is supported, and **false** means the opposite.|
...@@ -2691,13 +2691,13 @@ Checks whether a specified focus mode is supported. This API uses a promise to r ...@@ -2691,13 +2691,13 @@ Checks whether a specified focus mode is supported. This API uses a promise to r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------ | ----------------------- | ---- | ---------------- | | ------ | ----------------------- | ---- | ------------- |
| afMode | [FocusMode](#focusmode) | Yes | Focus mode.| | afMode | [FocusMode](#focusmode) | Yes | Focus mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ----------------------------------------------------------- | | ----------------- | --------------------------------------------------- |
| Promise<boolean\> | Promise used to return the focus mode support status. The value **true** means that the focus mode is supported, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the focus mode support status. The value **true** means that the focus mode is supported, and **false** means the opposite.|
**Example** **Example**
...@@ -2721,7 +2721,7 @@ Before the setting, use **[isFocusModeSupported](#isfocusmodesupported)** to che ...@@ -2721,7 +2721,7 @@ Before the setting, use **[isFocusModeSupported](#isfocusmodesupported)** to che
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------ | | -------- | ----------------------- | ---- | ------------------- |
| afMode | [FocusMode](#focusmode) | Yes | Focus mode. | | afMode | [FocusMode](#focusmode) | Yes | Focus mode. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2750,13 +2750,13 @@ Before the setting, use **[isFocusModeSupported](#isfocusmodesupported)** to che ...@@ -2750,13 +2750,13 @@ Before the setting, use **[isFocusModeSupported](#isfocusmodesupported)** to che
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------ | ----------------------- | ---- | ---------------- | | ------ | ----------------------- | ---- | ------------- |
| afMode | [FocusMode](#focusmode) | Yes | Focus mode.| | afMode | [FocusMode](#focusmode) | Yes | Focus mode.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -2778,7 +2778,7 @@ Obtains the focus mode in use. This API uses an asynchronous callback to return ...@@ -2778,7 +2778,7 @@ Obtains the focus mode in use. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------- | ---- | -------------------------------------- | | -------- | --------------------------------------- | ---- | ------------------------------- |
| callback | AsyncCallback<[FocusMode](#focusmode)\> | Yes | Callback used to return the focus mode.| | callback | AsyncCallback<[FocusMode](#focusmode)\> | Yes | Callback used to return the focus mode.|
**Example** **Example**
...@@ -2804,7 +2804,7 @@ Obtains the focus mode in use. This API uses a promise to return the result. ...@@ -2804,7 +2804,7 @@ Obtains the focus mode in use. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------- | ------------------------------------- | | ------------------- | -------------------------------- |
| Promise<FocusMode\> | Promise used to return the focus mode.| | Promise<FocusMode\> | Promise used to return the focus mode.|
**Example** **Example**
...@@ -2826,7 +2826,7 @@ Sets a focus point. This API uses an asynchronous callback to return the result. ...@@ -2826,7 +2826,7 @@ Sets a focus point. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | ----------------------- | ---- | ------------------- |
| point | [Point](#point) | Yes | Focus point. | | point | [Point](#point) | Yes | Focus point. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -2848,20 +2848,20 @@ cameraInput.setFocusPoint(Point1, (err) => { ...@@ -2848,20 +2848,20 @@ cameraInput.setFocusPoint(Point1, (err) => {
setFocusPoint(point: Point): Promise<void\> setFocusPoint(point: Point): Promise<void\>
Sets a focus point. This API uses a promise to return the result. Sets a focal point. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----- | --------------- | ---- | ------ | | -------- | ----------------------- | ---- | ------------------- |
| point | [Point](#point) | Yes | Focus point.| | point | [Point](#point) | Yes | Focal point. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -2878,15 +2878,15 @@ cameraInput.setFocusPoint(Point2).then(() => { ...@@ -2878,15 +2878,15 @@ cameraInput.setFocusPoint(Point2).then(() => {
getFocusPoint(callback: AsyncCallback<Point\>): void getFocusPoint(callback: AsyncCallback<Point\>): void
Obtains the focus point. This API uses an asynchronous callback to return the result. Obtains the focal point. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------- | ---- | ---------------------------- | | -------- | ---------------------------------- | ---- | ----------------------- |
| callback | AsyncCallback<[Point](#point)\> | Yes | Callback used to return the focus point.| | callback | AsyncCallback<[Point](#point)\> | Yes | Callback used to return the focal point.|
**Example** **Example**
...@@ -2904,15 +2904,15 @@ cameraInput.getFocusPoint((err, point) => { ...@@ -2904,15 +2904,15 @@ cameraInput.getFocusPoint((err, point) => {
getFocusPoint(): Promise<Point\> getFocusPoint(): Promise<Point\>
Obtains the focus point. This API uses a promise to return the result. Obtains the focal point. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| --------------- | ------------------------------- | | --------------- | --------------------------- |
| Promise<Point\> | Promise used to return the focus point.| | Promise<Point\> | Promise used to return the focal point.|
**Example** **Example**
...@@ -2933,7 +2933,7 @@ Obtains the focal length. This API uses an asynchronous callback to return the r ...@@ -2933,7 +2933,7 @@ Obtains the focal length. This API uses an asynchronous callback to return the r
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ---------------------------- | | -------- | ------------------------- | ---- | ----------------------- |
| callback | AsyncCallback<number\> | Yes | Callback used to return the focal length.| | callback | AsyncCallback<number\> | Yes | Callback used to return the focal length.|
**Example** **Example**
...@@ -2959,7 +2959,7 @@ Obtains the focal length. This API uses a promise to return the result. ...@@ -2959,7 +2959,7 @@ Obtains the focal length. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------- | --------------------------- | | ---------------- | ----------------------- |
| Promise<number\> | Promise used to return the focal length.| | Promise<number\> | Promise used to return the focal length.|
**Example** **Example**
...@@ -2974,15 +2974,15 @@ cameraInput.getFocalLength().then((focalLength) => { ...@@ -2974,15 +2974,15 @@ cameraInput.getFocalLength().then((focalLength) => {
getZoomRatioRange\(callback: AsyncCallback<Array<number\>\>\): void getZoomRatioRange\(callback: AsyncCallback<Array<number\>\>\): void
Obtains the zoom range. This API uses an asynchronous callback to return the result. Obtains the zoom ratio range. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------ | ---- | ------------------------ | | -------- | ------------------------------ | ---- | ------------------- |
| callback | AsyncCallback<Array<number\>\> | Yes | Callback used to return the zoom range.| | callback | AsyncCallback<Array<number\>\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3000,15 +3000,15 @@ cameraInput.getZoomRatioRange((err, zoomRatioRange) => { ...@@ -3000,15 +3000,15 @@ cameraInput.getZoomRatioRange((err, zoomRatioRange) => {
getZoomRatioRange\(\): Promise<Array<number\>\> getZoomRatioRange\(\): Promise<Array<number\>\>
Obtains the zoom range. This API uses a promise to return the result. Obtains the zoom ratio range. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| ------------------------ | ------------------------------- | | ------------------------ | --------------------------- |
| Promise<Array<number\>\> | Promise used to return the zoom range.| | Promise<Array<number\>\> | Promise used to return the zoom ratio range.|
**Example** **Example**
...@@ -3029,7 +3029,7 @@ Sets a zoom ratio. This API uses an asynchronous callback to return the result. ...@@ -3029,7 +3029,7 @@ Sets a zoom ratio. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | -------------------- | ---- | ------------------------ | | --------- | -------------------- | ---- | ------------------- |
| zoomRatio | number | Yes | Zoom ratio. | | zoomRatio | number | Yes | Zoom ratio. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
...@@ -3056,13 +3056,13 @@ Sets a zoom ratio. This API uses a promise to return the result. ...@@ -3056,13 +3056,13 @@ Sets a zoom ratio. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------ | ---- | ------------ | | --------- | ------ | ---- | --------- |
| zoomRatio | number | Yes | Zoom ratio.| | zoomRatio | number | Yes | Zoom ratio.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -3084,7 +3084,7 @@ Obtains the zoom ratio in use. This API uses an asynchronous callback to return ...@@ -3084,7 +3084,7 @@ Obtains the zoom ratio in use. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ------------------------ | | -------- | ---------------------- | ---- | ------------------- |
| callback | AsyncCallback<number\> | Yes | Callback used to return the result.| | callback | AsyncCallback<number\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3110,7 +3110,7 @@ Obtains the zoom ratio in use. This API uses a promise to return the result. ...@@ -3110,7 +3110,7 @@ Obtains the zoom ratio in use. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------- | --------------------------- | | ---------------- | ----------------------- |
| Promise<number\> | Promise used to return the zoom ratio.| | Promise<number\> | Promise used to return the zoom ratio.|
**Example** **Example**
...@@ -3125,16 +3125,16 @@ cameraInput.getZoomRatio().then((zoomRatio) => { ...@@ -3125,16 +3125,16 @@ cameraInput.getZoomRatio().then((zoomRatio) => {
isVideoStablizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback<boolean\>): void isVideoStablizationModeSupported(vsMode: VideoStabilizationMode, callback: AsyncCallback<boolean\>): void
Checks whether a specified video stabilization mode is supported. This API uses an asynchronous callback to return the result. Checks whether the specified video stabilization mode is supported. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------------------ | | -------- | ------------------------------------------------- | ---- | ------------------------------ |
| vsMode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode. | | vsMode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode. |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return whether the video stabilization mode is supported. The value **true** means that the video stabilization mode is supported, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return whether the video stabilization mode is supported. The value **true** means that the video stabilization mode is supported, and **false** means the opposite. |
**Example** **Example**
...@@ -3152,14 +3152,14 @@ captureSession.isVideoStablizationModeSupported(camera.VideoStabilizationMode.OF ...@@ -3152,14 +3152,14 @@ captureSession.isVideoStablizationModeSupported(camera.VideoStabilizationMode.OF
isVideoStablizationModeSupported(vsMode: VideoStabilizationMode): Promise<boolean\> isVideoStablizationModeSupported(vsMode: VideoStabilizationMode): Promise<boolean\>
Checks whether a specified video stabilization mode is supported. This API uses a promise to return the result. Checks whether the specified video stabilization mode is supported. This API uses a promise to return the result.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ----------------------------------------------------- | | ----------------- | --------------------------------------------- |
| Promise<boolean\> | Promise used to return whether the video stabilization mode is supported. The value **true** means that the video stabilization mode is supported, and **false** means the opposite.| | Promise<boolean\> | Promise used to return whether the video stabilization mode is supported. The value **true** means that the video stabilization mode is supported, and **false** means the opposite.|
**Example** **Example**
...@@ -3181,8 +3181,8 @@ Obtains the video stabilization mode in use. This API uses an asynchronous callb ...@@ -3181,8 +3181,8 @@ Obtains the video stabilization mode in use. This API uses an asynchronous callb
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------------------------- | ---- | ------------------------------------ | | -------- | ----------------------------------------- | ---- | ------------------------------ |
| callback | AsyncCallback<VideoStabilizationMode\> | Yes | Callback used to return the video stabilization mode.| | callback | AsyncCallback<VideoStabilizationMode\> | Yes | Callback used to return the video stabilization mode. |
**Example** **Example**
...@@ -3207,8 +3207,8 @@ Obtains the video stabilization mode in use. This API uses a promise to return t ...@@ -3207,8 +3207,8 @@ Obtains the video stabilization mode in use. This API uses a promise to return t
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------------------------- | --------------------------------------------------------- | | -------------------------------- | ------------------------------------------------- |
| Promise<VideoStabilizationMode\> | Promise used to return the video stabilization mode.| | Promise<VideoStabilizationMode\> | Promise used to return the video stabilization mode. |
**Example** **Example**
...@@ -3229,8 +3229,8 @@ Sets a video stabilization mode. This API uses an asynchronous callback to retur ...@@ -3229,8 +3229,8 @@ Sets a video stabilization mode. This API uses an asynchronous callback to retur
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ------------------------ | | -------- | ------------------------------------------------- | ---- | --------------------- |
| mode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode.| | mode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3255,15 +3255,15 @@ Sets a video stabilization mode. This API uses a promise to return the result. ...@@ -3255,15 +3255,15 @@ Sets a video stabilization mode. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name| Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---- | ------------------------------------------------- | ---- | ------------------------ | | -------- | ------------------------------------------------- | ---- | --------------------- |
| mode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode.| | mode | [VideoStabilizationMode](#videostabilizationmode) | Yes | Video stabilization mode. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------------------------------------- | | -------------- | ------------------------------------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result. |
**Example** **Example**
...@@ -3284,8 +3284,8 @@ Listens for focus state changes. This API uses an asynchronous callback to retur ...@@ -3284,8 +3284,8 @@ Listens for focus state changes. This API uses an asynchronous callback to retur
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------- | ---- | -------------------------------------------------------- | | -------- | ----------------------------------------- | ---- | ------------------------ |
| type | string | Yes | Event type. The value is fixed at **focusStateChange**, indicating the focus state change event.| | type | string | Yes | Event type. The value is fixed at **'focusStateChange'**, indicating the focus state change event.|
| callback | AsyncCallback<[FocusState](#focusstate)\> | Yes | Callback used to return the focus state change. | | callback | AsyncCallback<[FocusState](#focusstate)\> | Yes | Callback used to return the focus state change. |
**Example** **Example**
...@@ -3307,7 +3307,7 @@ Listens for exposure state changes. This API uses an asynchronous callback to re ...@@ -3307,7 +3307,7 @@ Listens for exposure state changes. This API uses an asynchronous callback to re
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------- | ---- | ----------------------------------------------------------- | | -------- | ----------------------------------------- | ---- | ---------------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **'exposureStateChange'**, indicating the exposure state change event.| | type | string | Yes | Event type. The value is fixed at **'exposureStateChange'**, indicating the exposure state change event.|
| callback | AsyncCallback<[ExposureState](#exposurestate)\> | Yes | Callback used to return the exposure state change. | | callback | AsyncCallback<[ExposureState](#exposurestate)\> | Yes | Callback used to return the exposure state change. |
...@@ -3330,8 +3330,8 @@ Listens for **CaptureSession** errors. This API uses a callback to return the er ...@@ -3330,8 +3330,8 @@ Listens for **CaptureSession** errors. This API uses a callback to return the er
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------------- | ---- | --------------------------------------------- | | -------- | ----------------------------------------------------------- | ---- | ------------------------------ |
| type | string | Yes | Event type. The value is fixed at **error**, indicating the capture session error event.| | type | string | Yes | Event type. The value is fixed at **'error'**, indicating the capture session error event.|
| callback | ErrorCallback<[CaptureSessionError](#capturesessionerror)\> | Yes | Callback used to return the error information. | | callback | ErrorCallback<[CaptureSessionError](#capturesessionerror)\> | Yes | Callback used to return the error information. |
**Example** **Example**
...@@ -3349,14 +3349,14 @@ Enumerates the error codes used in a **CaptureSession**. ...@@ -3349,14 +3349,14 @@ Enumerates the error codes used in a **CaptureSession**.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ---------------------------- | ---- | ---------- | | ----------------------------- | ---- | -------- |
| ERROR_UNKNOWN | -1 | Unknown error.| | ERROR_UNKNOWN | -1 | Unknown error.|
| ERROR_INSUFFICIENT_RESOURCES | 0 | Insufficient resources.| | ERROR_INSUFFICIENT_RESOURCES | 0 | Insufficient resources.|
| ERROR_TIMEOUT | 1 | Timeout. | | ERROR_TIMEOUT | 1 | Timeout.|
## CaptureSessionError ## CaptureSessionError
Defines a capture session error. Defines a **CaptureSession** error.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
...@@ -3379,7 +3379,7 @@ Releases output resources. This API uses an asynchronous callback to return the ...@@ -3379,7 +3379,7 @@ Releases output resources. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3405,7 +3405,7 @@ Releases output resources. This API uses a promise to return the result. ...@@ -3405,7 +3405,7 @@ Releases output resources. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -3431,8 +3431,8 @@ Adds a surface after a **PreviewOutput** instance is created. This API uses an a ...@@ -3431,8 +3431,8 @@ Adds a surface after a **PreviewOutput** instance is created. This API uses an a
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | -------------------- | ---- | ------------------------------------------------------------ | | -------- | -------------------- | ---- | -------------------------------------------------------------------- |
| surfaceId | string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)**.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3458,13 +3458,13 @@ Adds a surface after a **PreviewOutput** instance is created. This API uses a pr ...@@ -3458,13 +3458,13 @@ Adds a surface after a **PreviewOutput** instance is created. This API uses a pr
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------ | ---- | ------------------------------------------------------------ | | -------- | -----------| ---- | ------------------------------------------------------------------------------ |
| surfaceId | string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)**.| | surfaceId| string | Yes | Surface ID, which is obtained from **[XComponent](../arkui-ts/ts-basic-components-xcomponent.md)**.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -3486,7 +3486,7 @@ Starts to output preview streams. This API uses an asynchronous callback to retu ...@@ -3486,7 +3486,7 @@ Starts to output preview streams. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3512,7 +3512,7 @@ Starts to output preview streams. This API uses a promise to return the result. ...@@ -3512,7 +3512,7 @@ Starts to output preview streams. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -3534,7 +3534,7 @@ Stops outputting preview streams. This API uses an asynchronous callback to retu ...@@ -3534,7 +3534,7 @@ Stops outputting preview streams. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3560,7 +3560,7 @@ Stops outputting preview streams. This API uses a promise to return the result. ...@@ -3560,7 +3560,7 @@ Stops outputting preview streams. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -3582,8 +3582,8 @@ Listens for preview frame start events. This API uses an asynchronous callback t ...@@ -3582,8 +3582,8 @@ Listens for preview frame start events. This API uses an asynchronous callback t
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | -------------------------------------------- | | -------- | -------------------- | ---- | --------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **frameStart**, indicating the preview frame start event.| | type | string | Yes | Event type. The value is fixed at **'frameStart'**, indicating the preview frame start event.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3605,8 +3605,8 @@ Listens for preview frame end events. This API uses an asynchronous callback to ...@@ -3605,8 +3605,8 @@ Listens for preview frame end events. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------------------------ | | -------- | -------------------- | ---- | ------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **frameEnd**, indicating the preview frame end event.| | type | string | Yes | Event type. The value is fixed at **'frameEnd'**, indicating the preview frame end event.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3628,8 +3628,8 @@ Listens for **PreviewOutput** errors. This API uses a callback to return the err ...@@ -3628,8 +3628,8 @@ Listens for **PreviewOutput** errors. This API uses a callback to return the err
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------------ | ---- | --------------------------------------------- | | -------- | ----------------------------------------------------------------- | ---- | ------------------------ |
| type | string | Yes | Event type. The value is fixed at **error**, indicating the preview output error event.| | type | string | Yes | Event type. The value is fixed at **'error'**, indicating the preview output error event.|
| callback | ErrorCallback<[PreviewOutputErrorCode](#previewoutputerrorcode)\> | Yes | Callback used to return the error information. | | callback | ErrorCallback<[PreviewOutputErrorCode](#previewoutputerrorcode)\> | Yes | Callback used to return the error information. |
**Example** **Example**
...@@ -3647,7 +3647,7 @@ Enumerates the error codes used for preview output. ...@@ -3647,7 +3647,7 @@ Enumerates the error codes used for preview output.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------- | ---- | ---------- | | ------------- | ---- | -------- |
| ERROR_UNKNOWN | -1 | Unknown error.| | ERROR_UNKNOWN | -1 | Unknown error.|
## PreviewOutputError ## PreviewOutputError
...@@ -3657,7 +3657,7 @@ Defines the preview output error. ...@@ -3657,7 +3657,7 @@ Defines the preview output error.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name| Type | Description | | Name| Type | Description |
| ---- | ------------------------------------------------- | ------------------------- | | ---- | ------------------------------------------------- | ---------------------- |
| code | [PreviewOutputErrorCode](#previewoutputerrorcode) | **PreviewOutput** error code.| | code | [PreviewOutputErrorCode](#previewoutputerrorcode) | **PreviewOutput** error code.|
## ImageRotation ## ImageRotation
...@@ -3667,7 +3667,7 @@ Enumerates the image rotation angles. ...@@ -3667,7 +3667,7 @@ Enumerates the image rotation angles.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------ | ---- | --------------- | | ------------ | ---- | ------------- |
| ROTATION_0 | 0 | The image rotates 0 degrees. | | ROTATION_0 | 0 | The image rotates 0 degrees. |
| ROTATION_90 | 90 | The image rotates 90 degrees. | | ROTATION_90 | 90 | The image rotates 90 degrees. |
| ROTATION_180 | 180 | The image rotates 180 degrees.| | ROTATION_180 | 180 | The image rotates 180 degrees.|
...@@ -3679,11 +3679,11 @@ Defines geolocation information. ...@@ -3679,11 +3679,11 @@ Defines geolocation information.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Mandatory| Description | | Name | Type | Mandatory|Description |
| --------- | ------ | ---- | ---------- | | ------------ | ------ | --- |------------ |
| latitude | number | Yes | Latitude, in degree.| | latitude | number | Yes |Latitude, in degrees. |
| longitude | number | Yes | Longitude, in degree.| | longitude | number | Yes |Longitude, in degrees. |
| altitude | number | Yes | Altitude, in meter.| | altitude | number | Yes |Altitude, in meters. |
## QualityLevel ## QualityLevel
...@@ -3692,7 +3692,7 @@ Enumerates the image quality levels. ...@@ -3692,7 +3692,7 @@ Enumerates the image quality levels.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| -------------------- | ---- | -------------- | | -------------------- | ---- | ------------ |
| QUALITY_LEVEL_HIGH | 0 | High image quality. | | QUALITY_LEVEL_HIGH | 0 | High image quality. |
| QUALITY_LEVEL_MEDIUM | 1 | Medium image quality.| | QUALITY_LEVEL_MEDIUM | 1 | Medium image quality.|
| QUALITY_LEVEL_LOW | 2 | Low image quality. | | QUALITY_LEVEL_LOW | 2 | Low image quality. |
...@@ -3704,12 +3704,12 @@ Defines the settings for photo capture. ...@@ -3704,12 +3704,12 @@ Defines the settings for photo capture.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Mandatory| Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | ------------------------------- | ---- | ------------------ | ---------------------- | | -------- | ------------------------------- | ---- | ----------------- | -----------------|
| quality | [QualityLevel](#qualitylevel) | No | QUALITY_LEVEL_HIGH | Photo quality. | | quality | [QualityLevel](#qualitylevel) | No | QUALITY_LEVEL_HIGH| Photo quality. |
| rotation | [ImageRotation](#imagerotation) | No | ROTATION_0 | Rotation angle of the photo. | | rotation | [ImageRotation](#imagerotation) | No | ROTATION_0 | Rotation angle of the photo. |
| location | [Location](#location) | No | (0,0,0) | Geolocation information of the photo. | | location | [Location](#location) | No | (0,0,0) | Geolocation information of the photo. |
| mirror | boolean | No | false | Whether mirroring is enabled. By default, mirroring is disabled.| | mirror | boolean | No | false |Whether mirroring is enabled. By default, mirroring is disabled.|
## PhotoOutput ## PhotoOutput
...@@ -3726,7 +3726,7 @@ Obtains the default shooting parameters. This API uses an asynchronous callback ...@@ -3726,7 +3726,7 @@ Obtains the default shooting parameters. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------------- | ---- | ------------------------ | | -------- | ----------------------------------------------------------- | ---- | -------------------- |
| callback | AsyncCallback<[PhotoCaptureSetting](#photocapturesetting)\> | Yes | Callback used to return the result.| | callback | AsyncCallback<[PhotoCaptureSetting](#photocapturesetting)\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3752,7 +3752,7 @@ Obtains the default shooting parameters. This API uses a promise to return the r ...@@ -3752,7 +3752,7 @@ Obtains the default shooting parameters. This API uses a promise to return the r
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------------------------- | --------------------------- | | ----------------------------------------------------- | ----------------------- |
| Promise<[PhotoCaptureSetting](#photocapturesetting)\> | Promise used to return the result.| | Promise<[PhotoCaptureSetting](#photocapturesetting)\> | Promise used to return the result.|
**Example** **Example**
...@@ -3774,7 +3774,7 @@ Captures a photo with the default shooting parameters. This API uses an asynchro ...@@ -3774,7 +3774,7 @@ Captures a photo with the default shooting parameters. This API uses an asynchro
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -3800,9 +3800,9 @@ Captures a photo with the specified shooting parameters. This API uses an asynch ...@@ -3800,9 +3800,9 @@ Captures a photo with the specified shooting parameters. This API uses an asynch
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------- | ---- | ------------------------ | | -------- | ------------------------------------------- | ---- | -------------------- |
| setting | [PhotoCaptureSetting](#photocapturesetting) | Yes | Shooting settings. | | setting | [PhotoCaptureSetting](#photocapturesetting) | Yes | Shooting settings. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3831,13 +3831,13 @@ Captures a photo with the specified shooting parameters. This API uses a promise ...@@ -3831,13 +3831,13 @@ Captures a photo with the specified shooting parameters. This API uses a promise
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ------- | ------------------------------------------- | ---- | ---------- | | ------- | ------------------------------------------- | ---- | -------- |
| setting | [PhotoCaptureSetting](#photocapturesetting) | No | Shooting settings.| | setting | [PhotoCaptureSetting](#photocapturesetting) | No | Shooting settings.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
...@@ -3860,8 +3860,8 @@ Checks whether mirroring is supported. This API uses an asynchronous callback to ...@@ -3860,8 +3860,8 @@ Checks whether mirroring is supported. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------------------- | | -------- | ------------------------------------------------- | ---- | -------------------------- |
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the mirroring support status. The value **true** means that mirroring is supported, and **false** means the opposite.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the mirroring support status. The value **true** means that mirroring is supported, and **false** means the opposite. |
**Example** **Example**
...@@ -3886,8 +3886,8 @@ Checks whether mirroring is supported. This API uses a promise to return the res ...@@ -3886,8 +3886,8 @@ Checks whether mirroring is supported. This API uses a promise to return the res
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | ------------------------------------------------- | | ----------------- | ------------------------------------------- |
| Promise<boolean\> | Promise used to return the mirroring support status. The value **true** means that mirroring is supported, and **false** means the opposite.| | Promise<boolean\> | Promise used to return the mirroring support status. The value **true** means that mirroring is supported, and **false** means the opposite. |
**Example** **Example**
...@@ -3908,8 +3908,8 @@ Listens for shooting start events. This API uses an asynchronous callback to ret ...@@ -3908,8 +3908,8 @@ Listens for shooting start events. This API uses an asynchronous callback to ret
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ------------------------------------------------ | | -------- | ---------------------- | ---- | ------------------------------------------ |
| type | string | Yes | Event type. The value is fixed at **captureStart**, indicating the shooting start event.| | type | string | Yes | Event type. The value is fixed at **'captureStart'**, indicating the shooting start event.|
| callback | AsyncCallback<number\> | Yes | Callback used to return the capture ID. | | callback | AsyncCallback<number\> | Yes | Callback used to return the capture ID. |
**Example** **Example**
...@@ -3931,8 +3931,8 @@ Listens for frame shutter events. This API uses an asynchronous callback to retu ...@@ -3931,8 +3931,8 @@ Listens for frame shutter events. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ---------------------------------------------- | | -------- | ----------------------------------------------------- | --- | ------------------------------------ |
| type | string | Yes | Event type. The value is fixed at **frameShutter**, indicating the frame shutter event.| | type | string | Yes | Event type. The value is fixed at **'frameShutter'**, indicating the frame shutter event.|
| callback | AsyncCallback<[FrameShutterInfo](#frameshutterinfo)\> | Yes | Callback used to return the result. | | callback | AsyncCallback<[FrameShutterInfo](#frameshutterinfo)\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3955,8 +3955,8 @@ Listens for shooting end events. This API uses an asynchronous callback to retur ...@@ -3955,8 +3955,8 @@ Listens for shooting end events. This API uses an asynchronous callback to retur
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------- | ---- | ---------------------------------------------- | | -------- | ------------------------------------------------- | ---- | ---------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **captureEnd**, indicating the shooting end event.| | type | string | Yes | Event type. The value is fixed at **'captureEnd'**, indicating the shooting end event.|
| callback | AsyncCallback<[CaptureEndInfo](#captureendinfo)\> | Yes | Callback used to return the result. | | callback | AsyncCallback<[CaptureEndInfo](#captureendinfo)\> | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -3979,8 +3979,8 @@ Listens for **PhotoOutput** errors. This API uses a callback to return the error ...@@ -3979,8 +3979,8 @@ Listens for **PhotoOutput** errors. This API uses a callback to return the error
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------------------------------- | ---- | ----------------------------------------- | | -------- | ----------------------------------------------------- | ---- | ----------------------------------- |
| type | string | Yes | Event type. The value is fixed at **error**, indicating the photo output error event.| | type | string | Yes | Event type. The value is fixed at **'error'**, indicating the photo output error event.|
| callback | ErrorCallback<[PhotoOutputError](#photooutputerror)\> | Yes | Callback used to return the error information. | | callback | ErrorCallback<[PhotoOutputError](#photooutputerror)\> | Yes | Callback used to return the error information. |
**Example** **Example**
...@@ -3998,7 +3998,7 @@ Defines the frame shutter information. ...@@ -3998,7 +3998,7 @@ Defines the frame shutter information.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------ | ---- | ------------ | | --------- | ------ | ---- | ---------- |
| captureId | number | Yes | ID of this capture action. | | captureId | number | Yes | ID of this capture action. |
| timestamp | number | Yes | Timestamp when the frame shutter event is triggered.| | timestamp | number | Yes | Timestamp when the frame shutter event is triggered.|
...@@ -4009,7 +4009,7 @@ Defines the capture end information. ...@@ -4009,7 +4009,7 @@ Defines the capture end information.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ------ | ---- | ---------- | | ---------- | ------ | ---- | ---------|
| captureId | number | Yes | ID of this capture action.| | captureId | number | Yes | ID of this capture action.|
| frameCount | number | Yes | Number of frames captured. | | frameCount | number | Yes | Number of frames captured. |
...@@ -4020,7 +4020,7 @@ Enumerates the error codes used for photo output. ...@@ -4020,7 +4020,7 @@ Enumerates the error codes used for photo output.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ---------------------------- | ---- | ------------------ | | ----------------------------- | ---- | --------------- |
| ERROR_UNKNOWN | -1 | Unknown error. | | ERROR_UNKNOWN | -1 | Unknown error. |
| ERROR_DRIVER_ERROR | 0 | The driver or hardware is faulty.| | ERROR_DRIVER_ERROR | 0 | The driver or hardware is faulty.|
| ERROR_INSUFFICIENT_RESOURCES | 1 | Insufficient resources. | | ERROR_INSUFFICIENT_RESOURCES | 1 | Insufficient resources. |
...@@ -4051,7 +4051,7 @@ Starts video recording. This API uses an asynchronous callback to return the res ...@@ -4051,7 +4051,7 @@ Starts video recording. This API uses an asynchronous callback to return the res
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------- | ---- | -------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4077,7 +4077,7 @@ Starts video recording. This API uses a promise to return the result. ...@@ -4077,7 +4077,7 @@ Starts video recording. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
...@@ -4126,7 +4126,7 @@ Stops video recording. This API uses a promise to return the result. ...@@ -4126,7 +4126,7 @@ Stops video recording. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\>| Promise used to return the result.|
**Example** **Example**
...@@ -4148,7 +4148,7 @@ Listens for video recording start events. This API uses an asynchronous callback ...@@ -4148,7 +4148,7 @@ Listens for video recording start events. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------------------------------ | | -------- | -------------------- | ---- | ----------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **frameStart**, indicating the video recording start event.| | type | string | Yes | Event type. The value is fixed at **frameStart**, indicating the video recording start event.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -4171,7 +4171,7 @@ Listens for video recording stop events. This API uses an asynchronous callback ...@@ -4171,7 +4171,7 @@ Listens for video recording stop events. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------------------------------ | | -------- | -------------------- | ---- | ------------------------------------------ |
| type | string | Yes | Event type. The value is fixed at **'frameEnd'**, indicating the video recording stop event.| | type | string | Yes | Event type. The value is fixed at **'frameEnd'**, indicating the video recording stop event.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. |
...@@ -4194,8 +4194,8 @@ Listens for errors that occur during video recording. This API uses a callback t ...@@ -4194,8 +4194,8 @@ Listens for errors that occur during video recording. This API uses a callback t
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------ | ---- | --------------------------------------------- | | -------- | ------------------------------------------------ | ---- | -------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **error**, indicating the video output error event.| | type | string | Yes | Event type. The value is fixed at **'error'**, indicating the video output error event.|
| callback | Callback<[VideoOutputError](#videooutputerror)\> | Yes | Callback used to return the error information. | | callback | Callback<[VideoOutputError](#videooutputerror)\> | Yes | Callback used to return the error information. |
**Example** **Example**
...@@ -4213,7 +4213,7 @@ Enumerates the error codes used for video recording. ...@@ -4213,7 +4213,7 @@ Enumerates the error codes used for video recording.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ------------------ | ---- | ------------------ | | --------------------- | ---- | ------------ |
| ERROR_UNKNOWN | -1 | Unknown error. | | ERROR_UNKNOWN | -1 | Unknown error. |
| ERROR_DRIVER_ERROR | 0 | The driver or hardware is faulty.| | ERROR_DRIVER_ERROR | 0 | The driver or hardware is faulty.|
...@@ -4234,7 +4234,7 @@ Enumerates metadata streams. ...@@ -4234,7 +4234,7 @@ Enumerates metadata streams.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| -------------- | ---- | ------------------ | | ------------------------- | ---- | ----------------- |
| FACE_DETECTION | 0 | Metadata object type.| | FACE_DETECTION | 0 | Metadata object type.|
## Rect ## Rect
...@@ -4244,9 +4244,9 @@ Defines a rectangle. ...@@ -4244,9 +4244,9 @@ Defines a rectangle.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Type | Description | | Name | Type | Description |
| -------- | ------ | --------------------- | | -------- | ------ | -------------------- |
| topLeftX | number | X-axis coordinate of the upper left corner of the rectangle.| | topLeftX | number | X-axis coordinate of the upper left corner of the rectangle. |
| topLeftY | number | Y-axis coordinate of the upper left corner of the rectangle.| | topLeftY | number | Y-axis coordinate of the upper left corner of the rectangle. |
| width | number | Width of the rectangle. | | width | number | Width of the rectangle. |
| height | number | Height of the rectangle. | | height | number | Height of the rectangle. |
...@@ -4265,7 +4265,7 @@ Obtains the metadata object type. This API uses an asynchronous callback to retu ...@@ -4265,7 +4265,7 @@ Obtains the metadata object type. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | --------------------------------------------------------- | ---- | ------------------------ | | -------- | --------------------------------------------------------- | --- | -------------------- |
| callback | AsyncCallback<[MetadataObjectType](#metadataobjecttype)\> | Yes | Callback used to return the result.| | callback | AsyncCallback<[MetadataObjectType](#metadataobjecttype)\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4313,7 +4313,7 @@ Obtains the metadata timestamp. This API uses an asynchronous callback to return ...@@ -4313,7 +4313,7 @@ Obtains the metadata timestamp. This API uses an asynchronous callback to return
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------- | ---- | ------------------------ | | -------- | ----------------------------------------------------------- | ---- | ------------------------ |
| callback | AsyncCallback<number\> | Yes | Callback used to return the result.| | callback | AsyncCallback<number\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4339,7 +4339,7 @@ Obtains the metadata timestamp. This API uses a promise to return the result. ...@@ -4339,7 +4339,7 @@ Obtains the metadata timestamp. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------- | --------------------------- | | ---------------- | --------------------------- |
| Promise<number)\> | Promise used to return the result.| | Promise<number)\> | Promise used to return the result.|
**Example** **Example**
...@@ -4361,7 +4361,7 @@ Obtains the bounding box of metadata. This API uses an asynchronous callback to ...@@ -4361,7 +4361,7 @@ Obtains the bounding box of metadata. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ----------------------------- | ---- | ------------------------ | | -------- | ----------------------------------------------------------- | ---- | ------------------------ |
| callback | AsyncCallback<[Rect](#rect)\> | Yes | Callback used to return the result.| | callback | AsyncCallback<[Rect](#rect)\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4387,7 +4387,7 @@ Obtains the bounding box of metadata. This API uses a promise to return the resu ...@@ -4387,7 +4387,7 @@ Obtains the bounding box of metadata. This API uses a promise to return the resu
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------- | --------------------------- | | ---------------------- | --------------------------- |
| Promise<[Rect](#rect)\> | Promise used to return the result.| | Promise<[Rect](#rect)\> | Promise used to return the result.|
**Example** **Example**
...@@ -4400,11 +4400,11 @@ metadataObject.getBoundingBox().then((rect) => { ...@@ -4400,11 +4400,11 @@ metadataObject.getBoundingBox().then((rect) => {
## MetadataFaceObject ## MetadataFaceObject
Implements the face object of metadata. It inherits **[MetadataObject](#metadataobject)**. Implements the face object of metadata. It inherits [MetadataObject](#metadataobject).
## MetadataOutput ## MetadataOutput
Implements metadata stream. It inherits **[CameraOutput](#cameraoutput)**. Implements metadata streams. It inherits **[CameraOutput](#cameraoutput)**.
### start ### start
...@@ -4417,7 +4417,7 @@ Starts to output metadata. This API uses an asynchronous callback to return the ...@@ -4417,7 +4417,7 @@ Starts to output metadata. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | ----------------------------------------------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4443,8 +4443,8 @@ Starts to output metadata. This API uses a promise to return the result. ...@@ -4443,8 +4443,8 @@ Starts to output metadata. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | ---------------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.| | Promise<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -4465,7 +4465,7 @@ Stops outputting metadata. This API uses an asynchronous callback to return the ...@@ -4465,7 +4465,7 @@ Stops outputting metadata. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | -------------------- | ---- | ------------------------ | | -------- | -------------------------- | ---- | ------------------- |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result.|
**Example** **Example**
...@@ -4491,8 +4491,8 @@ Stops outputting metadata. This API uses a promise to return the result. ...@@ -4491,8 +4491,8 @@ Stops outputting metadata. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| -------------- | --------------------------- | | ---------------------- | --------------------------- |
| Promise<void\>| Promise used to return the result.| | Promise<void\> | Promise used to return the result.|
**Example** **Example**
...@@ -4513,7 +4513,7 @@ Listens for metadata objects. This API uses an asynchronous callback to return t ...@@ -4513,7 +4513,7 @@ Listens for metadata objects. This API uses an asynchronous callback to return t
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ---------------------------------------------------- | ---- | ------------------------------------------------------------ | | -------- | ----------------------------------------------- - | ---- | ------------------------------------ |
| type | string | Yes | Event type. The value is fixed at **'metadataObjectsAvailable'**, that is, the metadata object.| | type | string | Yes | Event type. The value is fixed at **'metadataObjectsAvailable'**, that is, the metadata object.|
| callback | Callback<Array<[MetadataObject](#metadataobject)\>\> | Yes | Callback used to return the error information. | | callback | Callback<Array<[MetadataObject](#metadataobject)\>\> | Yes | Callback used to return the error information. |
...@@ -4536,7 +4536,7 @@ Listens for metadata errors. This API uses an asynchronous callback to return th ...@@ -4536,7 +4536,7 @@ Listens for metadata errors. This API uses an asynchronous callback to return th
**Parameters** **Parameters**
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------- | ------------------------------------------------------ | ---- | --------------------------------------------- | | -------- | ------------------------------------------------ | ---- | --------------------------------------- |
| type | string | Yes | Event type. The value is fixed at **'error'**, that is, the metadata error.| | type | string | Yes | Event type. The value is fixed at **'error'**, that is, the metadata error.|
| callback | Callback<[MetadataOutputError](#metadataoutputerror)\> | Yes | Callback used to return the error information. | | callback | Callback<[MetadataOutputError](#metadataoutputerror)\> | Yes | Callback used to return the error information. |
...@@ -4550,12 +4550,12 @@ metadataOutput.on('error', (metadataOutputError) => { ...@@ -4550,12 +4550,12 @@ metadataOutput.on('error', (metadataOutputError) => {
## MetadataOutputErrorCode ## MetadataOutputErrorCode
Enumerates the error codes used for metadata output. Enumerates the codes used for metadata output errors.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name | Value | Description | | Name | Value | Description |
| ---------------------------- | ---- | ---------- | | ------------------------------- | ---- | -------- |
| ERROR_UNKNOWN | -1 | Unknown error.| | ERROR_UNKNOWN | -1 | Unknown error.|
| ERROR_INSUFFICIENT_RESOURCES | 0 | Insufficient resources.| | ERROR_INSUFFICIENT_RESOURCES | 0 | Insufficient resources.|
...@@ -4566,5 +4566,5 @@ Defines a metadata output error. ...@@ -4566,5 +4566,5 @@ Defines a metadata output error.
**System capability**: SystemCapability.Multimedia.Camera.Core **System capability**: SystemCapability.Multimedia.Camera.Core
| Name| Type | Description | | Name| Type | Description |
| ---- | --------------------------------------------------- | -------------------------- | | ---- | ------------------------------------- | ----------------------- |
| code | [MetadataOutputErrorCode](#metadataoutputerrorcode) | **MetadataOutput** error code.| | code | [MetadataOutputErrorCode](#metadataoutputerrorcode) | **MetadataOutput** error code.|
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册