| metadataObjectTypes | Array<[MetadataObjectType](#metadataobjecttype)\> | Yes | Metadata object types, which are obtained through **getSupportedOutputCapability**.|
| metadataObjectTypes | Array\<[MetadataObjectType](#metadataobjecttype)\> | Yes | Metadata object types, which are obtained through **getSupportedOutputCapability**.|
| type | string | Yes | Event type. The value is fixed at **'cameraStatus'**. The event can be listened for when a **CameraManager** instance is obtained. This event is triggered and the corresponding information is returned only when the device is enabled or disabled.|
| type | string | Yes | Event type. The value is fixed at **'cameraStatus'**. The event can be listened for when a **CameraManager** instance is obtained. This event is triggered and the corresponding information is returned only when the device is enabled or disabled.|
| 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.| |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -719,7 +719,7 @@ cameraInput.open((err) => {
...
@@ -719,7 +719,7 @@ cameraInput.open((err) => {
### open
### open
open(): Promise<void\>
open(): Promise\<void\>
Opens this camera. This API uses a promise to return the result.
Opens this camera. This API uses a promise to return the result.
...
@@ -729,7 +729,7 @@ Opens this camera. This API uses a promise to return the result.
...
@@ -729,7 +729,7 @@ Opens this camera. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -787,7 +787,7 @@ cameraInput.close((err) => {
...
@@ -787,7 +787,7 @@ cameraInput.close((err) => {
### close
### close
close(): Promise<void\>
close(): Promise\<void\>
Closes this camera. This API uses a promise to return the result.
Closes this camera. This API uses a promise to return the result.
...
@@ -797,7 +797,7 @@ Closes this camera. This API uses a promise to return the result.
...
@@ -797,7 +797,7 @@ Closes this camera. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.|
| Promise\<void\>| Promise used to return the result.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **CameraInput** instance is created. This event is triggered and the result is returned when an error occurs on the camera. For example, if the device is unavailable or a conflict occurs, the error information is returned.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **CameraInput** instance is created. This event is triggered and the result is returned when an error occurs on the camera. For example, if the device is unavailable or a conflict occurs, the error information is returned.|
| FOCUS_MODE_MANUAL | 0 | Manual focus. The focal length of the camera can be manually set to change the focus position. However, the focal point cannot be set. |
| FOCUS_MODE_MANUAL | 0 | Manual focus. The focal length of the camera can be manually set to change the focus position. However, the focal point cannot be set. |
| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Continuous auto focus. The focal point cannot be set.|
| FOCUS_MODE_CONTINUOUS_AUTO | 1 | Continuous auto focus. The focal point cannot be set.|
| FOCUS_MODE_AUTO | 2 | Auto focus. The focal point can be set by calling [setFocusPoint](#setfocuspoint), and auto focus is performed once based on the focal point. After the auto focus operation is complete (regardless of whether the focus is successful or fails), the focus mode is locked. To enable the camera to initiate another auto focus, the application must call **CONTINUOUS_AUTO** again. |
| FOCUS_MODE_AUTO | 2 | Auto focus. The focal point can be set by calling [setFocusPoint](#setfocuspoint), and auto focus is performed once based on the focal point. After the auto focus operation is complete (regardless of whether the focus is successful or fails), the focus mode is locked. To enable the camera to initiate another auto focus, the application must call **CONTINUOUS_AUTO** again. |
| FOCUS_MODE_LOCKED | 3 | Focus locked. The focal point cannot be set. |
| FOCUS_MODE_LOCKED | 3 | Focus locked. The focal point cannot be set. |
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Commits the configuration for this **CaptureSession** instance. This API uses a promise to return the result.
Commits the configuration for this **CaptureSession** instance. This API uses a promise to return the result.
...
@@ -990,7 +990,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses a
...
@@ -990,7 +990,7 @@ Commits the configuration for this **CaptureSession** instance. This API uses a
| Type | Description |
| Type | Description |
| -------------- | ------------------------ |
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -1094,7 +1094,7 @@ try {
...
@@ -1094,7 +1094,7 @@ try {
### addOutput
### addOutput
addOutput(previewOutput: CameraOutput): void
addOutput(cameraOutput: CameraOutput): void
Adds a [CameraOutput](#cameraoutput) instance to the session.
Adds a [CameraOutput](#cameraoutput) instance to the session.
...
@@ -1104,7 +1104,7 @@ Adds a [CameraOutput](#cameraoutput) instance to the session.
...
@@ -1104,7 +1104,7 @@ Adds a [CameraOutput](#cameraoutput) instance to the session.
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Stops this **CaptureSession**. This API uses a promise to return the result.
Stops this **CaptureSession**. This API uses a promise to return the result.
...
@@ -1286,7 +1286,7 @@ Stops this **CaptureSession**. This API uses a promise to return the result.
...
@@ -1286,7 +1286,7 @@ Stops this **CaptureSession**. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Releases this **CaptureSession**. This API uses a promise to return the result.
Releases this **CaptureSession**. This API uses a promise to return the result.
...
@@ -1352,7 +1352,7 @@ Releases this **CaptureSession**. This API uses a promise to return the result.
...
@@ -1352,7 +1352,7 @@ Releases this **CaptureSession**. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ------------------------ |
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -1709,7 +1709,7 @@ try {
...
@@ -1709,7 +1709,7 @@ try {
### getExposureBiasRange
### getExposureBiasRange
getExposureBiasRange(): Array<number\>
getExposureBiasRange(): Array\<number\>
Obtains the exposure compensation values of the device.
Obtains the exposure compensation values of the device.
...
@@ -1719,7 +1719,7 @@ Obtains the exposure compensation values of the device.
...
@@ -1719,7 +1719,7 @@ Obtains the exposure compensation values of the device.
| Type | Description |
| Type | Description |
| ---------- | ----------------------------- |
| ---------- | ----------------------------- |
| Array<number\> | An array of compensation values. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Array\<number\> | An array of compensation values. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -2032,7 +2032,7 @@ try {
...
@@ -2032,7 +2032,7 @@ try {
### getZoomRatioRange
### getZoomRatioRange
getZoomRatioRange(): Array<number\>
getZoomRatioRange(): Array\<number\>
Obtains the supported zoom ratio range.
Obtains the supported zoom ratio range.
...
@@ -2042,7 +2042,7 @@ Obtains the supported zoom ratio range.
...
@@ -2042,7 +2042,7 @@ Obtains the supported zoom ratio range.
| Type | Description |
| Type | Description |
| ---------- | ----------------------------- |
| ---------- | ----------------------------- |
| Array<number\> | Callback used to return an array containing the minimum and maximum zoom ratios. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Array\<number\> | Callback used to return an array containing the minimum and maximum zoom ratios. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| type | string | Yes | Event type. The value is fixed at **'focusStateChange'**. The event can be listened for when a session is created. This event is triggered only when the camera focus state changes in auto focus mode.|
| type | string | Yes | Event type. The value is fixed at **'focusStateChange'**. The event can be listened for when a session is created. This event is triggered only when the camera focus state changes in auto focus mode.|
| 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. |
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a session is created. This event is triggered and the error message is returned when an error occurs during the calling of a session-related API such as **beginConfig()**, **commitConfig()**, and **addInput**.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a session is created. This event is triggered and the error message is returned when an error occurs during the calling of a session-related API such as **beginConfig()**, **commitConfig()**, and **addInput**.|
| callback | ErrorCallback<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
| callback | ErrorCallback\<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
**Example**
**Example**
...
@@ -2303,7 +2303,7 @@ Implements preview output. It inherits **[CameraOutput](#cameraoutput)**.
...
@@ -2303,7 +2303,7 @@ Implements preview output. It inherits **[CameraOutput](#cameraoutput)**.
### start
### start
start(callback: AsyncCallback<void\>): void
start(callback: AsyncCallback\<void\>): void
Starts to output preview streams. This API uses an asynchronous callback to return the result.
Starts to output preview streams. This API uses an asynchronous callback to return the result.
...
@@ -2313,7 +2313,7 @@ Starts to output preview streams. This API uses an asynchronous callback to retu
...
@@ -2313,7 +2313,7 @@ Starts to output preview streams. This API uses an asynchronous callback to retu
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Starts to output preview streams. This API uses a promise to return the result.
Starts to output preview streams. This API uses a promise to return the result.
...
@@ -2347,7 +2347,7 @@ Starts to output preview streams. This API uses a promise to return the result.
...
@@ -2347,7 +2347,7 @@ Starts to output preview streams. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Releases output resources. This API uses a promise to return the result.
Releases output resources. This API uses a promise to return the result.
...
@@ -2463,7 +2463,7 @@ Releases output resources. This API uses a promise to return the result.
...
@@ -2463,7 +2463,7 @@ Releases output resources. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| type | string | Yes | Event type. The value is fixed at **'frameStart'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and returned when the bottom layer starts exposure for the first time.|
| type | string | Yes | Event type. The value is fixed at **'frameStart'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and returned when the bottom layer starts exposure for the first time.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. The preview starts as long as this event is returned. |
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. The preview starts as long as this event is returned. |
| type | string | Yes | Event type. The value is fixed at **'frameEnd'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and returned when the last frame of preview ends.|
| type | string | Yes | Event type. The value is fixed at **'frameEnd'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and returned when the last frame of preview ends.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. The preview ends as long as this event is returned. |
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. The preview ends as long as this event is returned. |
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the use of a preview-related API such as **start()** or **release()**.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **previewOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the use of a preview-related API such as **start()** or **release()**.|
| callback | ErrorCallback<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
| callback | ErrorCallback\<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
**Example**
**Example**
...
@@ -2609,7 +2609,7 @@ Implements output information used in a shooting session. This class inherits fr
...
@@ -2609,7 +2609,7 @@ Implements output information used in a shooting session. This class inherits fr
### capture
### capture
capture(callback: AsyncCallback<void\>): void
capture(callback: AsyncCallback\<void\>): void
Captures a photo with the default shooting parameters. This API uses an asynchronous callback to return the result.
Captures a photo with the default shooting parameters. This API uses an asynchronous callback to return the result.
...
@@ -2619,7 +2619,7 @@ Captures a photo with the default shooting parameters. This API uses an asynchro
...
@@ -2619,7 +2619,7 @@ Captures a photo with the default shooting parameters. This API uses an asynchro
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Captures a photo with the default shooting parameters. This API uses a promise to return the result.
Captures a photo with the default shooting parameters. This API uses a promise to return the result.
...
@@ -2654,7 +2654,7 @@ Captures a photo with the default shooting parameters. This API uses a promise t
...
@@ -2654,7 +2654,7 @@ Captures a photo with the default shooting parameters. This API uses a promise t
| Type | Description |
| Type | Description |
| -------------- | ------------------------ |
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned. |
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned. |
Captures a photo with the specified shooting parameters. This API uses a promise to return the result.
Captures a photo with the specified shooting parameters. This API uses a promise to return the result.
...
@@ -2741,7 +2741,7 @@ Captures a photo with the specified shooting parameters. This API uses a promise
...
@@ -2741,7 +2741,7 @@ Captures a photo with the specified shooting parameters. This API uses a promise
| Type | Description |
| Type | Description |
| -------------- | ------------------------ |
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
**Error codes**
...
@@ -2785,7 +2785,7 @@ let isSupported = photoOutput.isMirrorSupported();
...
@@ -2785,7 +2785,7 @@ let isSupported = photoOutput.isMirrorSupported();
### release
### release
release(callback: AsyncCallback<void\>): void
release(callback: AsyncCallback\<void\>): void
Releases output resources. This API uses an asynchronous callback to return the result.
Releases output resources. This API uses an asynchronous callback to return the result.
...
@@ -2795,7 +2795,7 @@ Releases output resources. This API uses an asynchronous callback to return the
...
@@ -2795,7 +2795,7 @@ Releases output resources. This API uses an asynchronous callback to return the
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Releases output resources. This API uses a promise to return the result.
Releases output resources. This API uses a promise to return the result.
...
@@ -2829,7 +2829,7 @@ Releases output resources. This API uses a promise to return the result.
...
@@ -2829,7 +2829,7 @@ Releases output resources. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| type | string | Yes | Event type. The value is fixed at **'captureStart'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and returned when the bottom layer starts exposure each time a photo is taken.|
| type | string | Yes | Event type. The value is fixed at **'captureStart'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and returned when the bottom layer starts exposure each time a photo is taken.|
| callback | AsyncCallback<number\> | Yes | Callback used to return the capture ID. |
| callback | AsyncCallback\<number\> | Yes | Callback used to return the capture ID. |
| type | string | Yes | Event type. The value is fixed at **'frameShutter'**. The event can be listened for when a **photoOutput** instance is created.|
| type | string | Yes | Event type. The value is fixed at **'frameShutter'**. The event can be listened for when a **photoOutput** instance is created.|
| callback | AsyncCallback<[FrameShutterInfo](#frameshutterinfo)\> | Yes | Callback used to return the result. A new photographing request can be delivered as long as this event is returned. |
| callback | AsyncCallback\<[FrameShutterInfo](#frameshutterinfo)\> | Yes | Callback used to return the result. A new photographing request can be delivered as long as this event is returned. |
| type | string | Yes | Event type. The value is fixed at **'captureEnd'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and the corresponding information is returned when the photographing is complete.|
| type | string | Yes | Event type. The value is fixed at **'captureEnd'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and the corresponding information is returned when the photographing is complete.|
| callback | AsyncCallback<[CaptureEndInfo](#captureendinfo)\> | Yes | Callback used to return the result. |
| callback | AsyncCallback\<[CaptureEndInfo](#captureendinfo)\> | Yes | Callback used to return the result. |
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a photographing-related API.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **photoOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a photographing-related API.|
| callback | ErrorCallback<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
| callback | ErrorCallback\<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
**Example**
**Example**
...
@@ -2971,7 +2971,7 @@ Implements output information used in a video recording session. This class inhe
...
@@ -2971,7 +2971,7 @@ Implements output information used in a video recording session. This class inhe
### start
### start
start(callback: AsyncCallback<void\>): void
start(callback: AsyncCallback\<void\>): void
Starts video recording. This API uses an asynchronous callback to return the result.
Starts video recording. This API uses an asynchronous callback to return the result.
...
@@ -2981,7 +2981,7 @@ Starts video recording. This API uses an asynchronous callback to return the res
...
@@ -2981,7 +2981,7 @@ Starts video recording. This API uses an asynchronous callback to return the res
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Starts video recording. This API uses a promise to return the result.
Starts video recording. This API uses a promise to return the result.
...
@@ -3016,7 +3016,7 @@ Starts video recording. This API uses a promise to return the result.
...
@@ -3016,7 +3016,7 @@ Starts video recording. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
Releases output resources. This API uses a promise to return the result.
Releases output resources. This API uses a promise to return the result.
...
@@ -3133,7 +3133,7 @@ Releases output resources. This API uses a promise to return the result.
...
@@ -3133,7 +3133,7 @@ Releases output resources. This API uses a promise to return the result.
| Type | Description |
| Type | Description |
| -------------- | ----------------------- |
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| type | string | Yes | Event type. The value is fixed at **'frameStart'**. The event can be listened for when a **videoOutput** instance is created. The event is triggered and the corresponding information is returned when the bottom layer starts exposure for the first time.|
| type | string | Yes | Event type. The value is fixed at **'frameStart'**. The event can be listened for when a **videoOutput** instance is created. The event is triggered and the corresponding information is returned when the bottom layer starts exposure for the first time.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. The recording starts as long as this event is returned. |
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. The recording starts as long as this event is returned. |
| type | string | Yes | Event type. The value is fixed at **'frameEnd'**. The event can be listened for when a **videoOutput** instance is created. This event is triggered and returned when the last frame of recording is complete.|
| type | string | Yes | Event type. The value is fixed at **'frameEnd'**. The event can be listened for when a **videoOutput** instance is created. This event is triggered and returned when the last frame of recording is complete.|
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. The recording ends as long as this event is returned. |
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. The recording ends as long as this event is returned. |
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **videoOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a recording-related API such as **start()** and **release()**.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **videoOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a recording-related API such as **start()** and **release()**.|
| callback | Callback<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
| callback | Callback\<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
**Example**
**Example**
...
@@ -3228,7 +3228,7 @@ Implements metadata streams. It inherits **[CameraOutput](#cameraoutput)**.
...
@@ -3228,7 +3228,7 @@ Implements metadata streams. It inherits **[CameraOutput](#cameraoutput)**.
### start
### start
start(callback: AsyncCallback<void\>): void
start(callback: AsyncCallback\<void\>): void
Starts to output metadata. This API uses an asynchronous callback to return the result.
Starts to output metadata. This API uses an asynchronous callback to return the result.
...
@@ -3238,7 +3238,7 @@ Starts to output metadata. This API uses an asynchronous callback to return the
...
@@ -3238,7 +3238,7 @@ Starts to output metadata. This API uses an asynchronous callback to return the
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| callback | AsyncCallback\<void\> | Yes | Callback used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise<void\> | Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| Promise\<void\> | Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| type | string | Yes | Event type. The value is fixed at **'metadataObjectsAvailable'**. The event can be listened for when a **metadataOutput** instance is created. This event is triggered and the corresponding metadata is returned when valid metadata is detected.|
| type | string | Yes | Event type. The value is fixed at **'metadataObjectsAvailable'**. The event can be listened for when a **metadataOutput** instance is created. This event is triggered and the corresponding metadata is returned when valid metadata is detected.|
| callback | Callback<Array<[MetadataObject](#metadataobject)\>\> | Yes | Callback used to return the metadata.|
| callback | Callback\<Array\<[MetadataObject](#metadataobject)\>\> | Yes | Callback used to return the metadata.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **metadataOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a metadata-related API such as **start()** and **release()**.|
| type | string | Yes | Event type. The value is fixed at **'error'**. The event can be listened for when a **metadataOutput** instance is created. This event is triggered and the corresponding error message is returned when an error occurs during the calling of a metadata-related API such as **start()** and **release()**.|
| callback | Callback<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
| callback | Callback\<BusinessError\> | Yes | Callback used to return an error code defined in [CameraErrorCode](#cameraerrorcode). |
**Example**
**Example**
...
@@ -3417,6 +3417,8 @@ Defines a rectangle.
...
@@ -3417,6 +3417,8 @@ Defines a rectangle.
Implements camera metadata, which is the data source of [CameraInput](#camerainput). The metadata is obtained through metadataOutput.on('metadataObjectsAvailable').
Implements camera metadata, which is the data source of [CameraInput](#camerainput). The metadata is obtained through metadataOutput.on('metadataObjectsAvailable').