> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
...
...
@@ -11,25 +11,22 @@ import camera from '@ohos.multimedia.camera';
Creates a **CameraInput** instance with the specified camera position and camera type. This API uses an asynchronous callback to return the instance.
Creates a **CameraInput** instance with the specified camera position and camera type. This method uses an asynchronous callback to return the instance.
when we call *cameraManager.getCameras()* API, then it will return the **Camera** class which will have all camera-related metadata such as *cameraId, cameraPosition, cameraType & connectionType*.
## Camera
**System Capabilities:**
After **[camera.getCameraManager](#cameragetcameramanager)** is called, a camera instance is returned, including camera-related metadata such as **cameraId**, **cameraPosition**, **cameraType**, and **connectionType**.
| cameraPosition | cameraPosition | readonly | Camera position |
| cameraType | cameraType | readonly | Camera type |
| connectionType | connectionType | readonly | Camera connection type |
**Example**
```
asyncfunctiongetCameraInfo(){
...
...
@@ -367,41 +339,37 @@ async function getCameraInfo() {
```
## CameraStatusInfo<a name="section_Camera"></a>
This interface is a CameraManager callback API return. **CameraStatusInfo** will have *Camera* class & *CameraStatus* predefine constants.From *Camera* class, we can have all camera-related metadata & from *CameraStatus* constants, we will have information such as *APPEAR, DISAPPEAR, AVAILABLE & UNAVAILABLE*.
| 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 mode support status. The value **true** means that the specified flash mode is supported.|
Sets the flash mode. This API uses an asynchronous callback to return the result.
**Description**
Before setting the parameters, do the following checks:
Sets flash mode. This method uses an asynchronous callback to return the result.
1. Use [hasFlash](#hasflash) to check whether the device has flash light.
2. Use [isFlashModeSupported](#isflashmodesupported) to check whether the device supports a specified flash mode.
Note: Before setting the flash mode, check the support for the flash light (<ahref="#sec_hasFlash">hasFlash</a> method) and flash mode support (<ahref="#sec_isFlashModeSupported">isFlashModeSupported</a> method);
Sets the flash mode. This API uses a promise to return the result.
**Description**
Before setting the parameters, do the following checks:
Sets flash mode. This method uses a promise to return the result.
1. Use [hasFlash](#hasflash) to check whether the device has flash light.
2. Use [isFlashModeSupported](#isflashmodesupported) to check whether the device supports a specified flash mode.
Note: Before setting the flash mode, check the support for the flash light (<ahref="#sec_hasFlash">hasFlash</a> method) and flash mode support (<ahref="#sec_isFlashModeSupported">isFlashModeSupported</a> method);
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the focus mode support status. The value **true** means that the specified focus mode is supported.|