letpathDir="/data/storage/el2/base/haps/entry/files"// The path used here is an example. Obtain the path based on project requirements.
// The stream in the path can be pushed to the device by running the "hdc file send D:\xxx\H264_AAC.mp4 /data/app/el2/100/base/ohos.acts.multimedia.media.avplayer/haps/entry/files" command.
letpath=pathDir+'/H264_AAC.mp4'
letfile=awaitfs.open(path)
fdPath=fdPath+''+file.fd
this.avPlayer.url=fdPath
letfileDescriptor=undefined
// Use getRawFileDescriptor of the resource management module to obtain the media assets in the application, and use the fdSrc attribute of the AVPlayer to initialize the media assets.
// For details on the fd/offset/length parameter, see the Media API. The globalThis.abilityContext parameter is a system environment variable and is saved as a global variable on the main page during the system boost.
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -255,6 +264,14 @@ Creates a **CameraInput** instance with the specified **CameraDevice** object. T
| ---------- | ----------------------------- |
| [CameraInput](#camerainput) | **CameraInput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -291,6 +308,14 @@ Creates a **CameraInput** instance with the specified camera position and type.
| ---------- | ----------------------------- |
| [CameraInput](#camerainput) | **CameraInput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -327,6 +352,14 @@ Creates a **PreviewOutput** instance. This API returns the result synchronously.
| ---------- | ----------------------------- |
| [PreviewOutput](#previewoutput) | **PreviewOutput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -361,6 +394,14 @@ Creates a **PhotoOutput** instance. This API returns the result synchronously.
| ---------- | ----------------------------- |
| [PhotoOutput](#photooutput) | **PhotoOutput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -395,6 +436,14 @@ Creates a **VideoOutput** instance. This API returns the result synchronously.
| ---------- | ----------------------------- |
| [VideoOutput](#videooutput) | **VideoOutput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -428,6 +477,14 @@ Creates a **MetadataOutput** instance. This API returns the result synchronously
| ---------- | ----------------------------- |
| [MetadataOutput](#metadataoutput) | **MetadataOutput** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
**Example**
```js
...
...
@@ -455,6 +512,14 @@ Creates a **CaptureSession** instance. This API returns the result synchronously
| ---------- | ----------------------------- |
| [CaptureSession](#capturesession) | **CaptureSession** instance created. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -630,6 +695,16 @@ Opens this camera. This API uses an asynchronous callback to return the result.
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400107 | Can not use camera cause of conflict. |
| 7400108 | Camera disabled cause of security reason. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -656,6 +731,16 @@ Opens this camera. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400107 | Can not use camera cause of conflict. |
| 7400108 | Camera disabled cause of security reason. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -680,6 +765,14 @@ Closes this camera. This API uses an asynchronous callback to return the result.
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -706,6 +799,14 @@ Closes this camera. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -823,6 +924,14 @@ Starts configuration for the session.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400105 | Session config locked. |
**Example**
```js
...
...
@@ -848,6 +957,15 @@ Commits the configuration for this **CaptureSession** instance. This API uses an
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400102 | Operation not allow. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -874,6 +992,15 @@ Commits the configuration for this **CaptureSession** instance. This API uses a
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400102 | Operation not allow. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -905,6 +1032,15 @@ Adds a [CameraInput](#camerainput) instance to the session.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400102 | Operation not allow. |
**Example**
```js
...
...
@@ -936,6 +1072,15 @@ Removes a [CameraInput](#camerainput) instance from the session.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400102 | Operation not allow. |
**Example**
```js
...
...
@@ -967,6 +1112,15 @@ Adds a [CameraOutput](#cameraoutput) instance to the session.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400102 | Operation not allow. |
**Example**
```js
...
...
@@ -998,6 +1152,15 @@ Removes a [CameraOutput](#cameraoutput) instance from the session.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400102 | Operation not allow. |
**Example**
```js
...
...
@@ -1023,6 +1186,15 @@ Starts this **CaptureSession**. This API uses an asynchronous callback to return
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1049,6 +1221,15 @@ Starts this **CaptureSession**. This API uses a promise to return the result.
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1073,6 +1254,14 @@ Stops this **CaptureSession**. This API uses an asynchronous callback to return
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1099,6 +1288,14 @@ Stops this **CaptureSession**. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1123,6 +1320,14 @@ Releases this **CaptureSession**. 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1149,6 +1354,14 @@ Releases this **CaptureSession**. This API uses a promise to return the result.
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -1173,6 +1386,14 @@ Checks whether the device has flash. This API uses an asynchronous callback to r
| ---------- | ----------------------------- |
| boolean | Returns **true** if the device has flash; returns **false** otherwise. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1204,6 +1425,14 @@ Checks whether a flash mode is supported.
| ---------- | ----------------------------- |
| boolean | Returns **true** if the flash mode is supported; returns **false** otherwise. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1240,6 +1469,14 @@ Before the setting, do the following checks:
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1265,6 +1502,14 @@ Obtains the flash mode in use.
| ---------- | ----------------------------- |
| [FlashMode](#flashmode) | Flash mode obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1296,6 +1541,14 @@ Checks whether an exposure mode is supported.
| ---------- | ----------------------------- |
| boolean | Returns **true** if the exposure mode is supported; returns **false** otherwise. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1321,6 +1574,14 @@ Obtains the exposure mode in use.
| ---------- | ----------------------------- |
| [ExposureMode](#exposuremode) | Exposure mode obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1352,6 +1613,14 @@ Sets an exposure mode for the device.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1377,6 +1646,14 @@ Obtains the metering point of the device.
| ---------- | ----------------------------- |
| [Point](#point) | Metering point obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1410,6 +1687,14 @@ The coordinate system is based on the horizontal device direction with the devic
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1436,6 +1721,14 @@ Obtains the exposure compensation values of the device.
| ---------- | ----------------------------- |
| Array<number\> | An array of compensation values. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1463,6 +1756,14 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure
| exposureBias | number | Yes | Exposure bias to set, which must be within the range obtained by running **getExposureBiasRange** interface. If the API call fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1489,6 +1790,14 @@ Obtains the exposure value in use.
| ---------- | ----------------------------- |
| number | Exposure value obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1520,6 +1829,14 @@ Checks whether a focus mode is supported.
| ---------- | ----------------------------- |
| boolean | Returns **true** if the focus mode is supported; returns **false** otherwise. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1553,6 +1870,14 @@ Before the setting, use **[isFocusModeSupported](#isfocusmodesupported)** to che
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1578,6 +1903,14 @@ Obtains the focus mode in use.
| ---------- | ----------------------------- |
| [FocusMode](#focusmode) | Focus mode obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1611,6 +1944,14 @@ The coordinate system is based on the horizontal device direction with the devic
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1637,6 +1978,14 @@ Obtains the focal point of the device.
| ---------- | ----------------------------- |
| [Point](#point) | Focal point obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1662,6 +2011,14 @@ Obtains the focal length of the device.
| ---------- | ----------------------------- |
| number | Focal length obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1687,6 +2044,14 @@ Obtains the supported zoom ratio range.
| ---------- | ----------------------------- |
| 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1718,6 +2083,14 @@ Sets a zoom ratio, with a maximum precision of two decimal places.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1744,6 +2117,14 @@ Obtains the zoom ratio in use.
| ---------- | ----------------------------- |
| number | Zoom ratio obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1775,6 +2156,14 @@ Checks whether the specified video stabilization mode is supported.
| ---------- | ----------------------------- |
| boolean | Returns **true** if the video stabilization mode is supported; returns **false** otherwise. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1800,6 +2189,14 @@ Obtains the video stabilization mode in use.
| ---------- | ----------------------------- |
| VideoStabilizationMode | Video stabilization mode obtained. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1831,6 +2228,14 @@ Sets a video stabilization mode for the device.
| ---------- | ----------------------------- |
| [CameraErrorCode](#cameraerrorcode) | If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1910,6 +2315,14 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -1936,6 +2349,14 @@ Starts to output preview streams. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
**Example**
```js
...
...
@@ -2010,6 +2431,14 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2036,6 +2465,14 @@ Releases output resources. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2184,6 +2621,15 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400104 | Session not running. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2210,6 +2656,15 @@ Captures a photo with the default shooting parameters. This API uses a promise t
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400104 | Session not running. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2235,6 +2690,16 @@ Captures a photo with the specified shooting parameters. This API uses an asynch
| 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**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400104 | Session not running. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2278,6 +2743,15 @@ Captures a photo with the specified shooting parameters. This API uses a promise
| -------------- | ------------------------ |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400101 | Parameter missing or parameter type incorrect |
| 7400104 | Session not running. |
| 7400201 | Camera service fatal error. |
**Example**
...
...
@@ -2323,6 +2797,14 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2349,6 +2831,14 @@ Releases output resources. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2493,6 +2983,15 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2519,6 +3018,14 @@ Starts video recording. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
| 7400201 | Camera service fatal error. |
**Example**
...
...
@@ -2594,6 +3101,14 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2620,6 +3135,14 @@ Releases output resources. This API uses a promise to return the result.
| -------------- | ----------------------- |
| Promise<void\>| Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2717,6 +3240,15 @@ 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.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).
| ID | Error Message |
| --------------- | --------------- |
| 7400103 | Session not config. |
| 7400201 | Camera service fatal error. |
**Example**
```js
...
...
@@ -2743,6 +3275,15 @@ Starts to output metadata. This API uses a promise to return the result.
| Promise<void\> | Promise used to return the result. If the operation fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
**Error codes**
For details about the error codes, see [CameraErrorCode](#cameraerrorcode).