Module Description

The module provides a set of easy-to-use camera service APIs. With these APIs, you can create camera applications that access and control camera hardware to achieve basic functions like previewing, taking photos, and recording videos. In addition, you can combine these APIs to perform advanced operations, such as controlling the flash, exposure time, and focus.

NOTE

The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.

This module contains the following classes:

  • AutoDeviceSwitch class, which provides the capabilities of checking the support for automatic camera switching and enabling or disabling automatic camera switching.
  • AutoExposure class, which provides the capabilities related to the device's automatic exposure feature, including setting or querying the exposure value, metering point, and exposure compensation.
  • Aperture class, which provides the capabilities related to the physical aperture.
  • ApertureQuery class, which provides the capabilities of querying the physical aperture.
  • CameraInput class, which provides the capabilities of enabling or disabling the camera switch and listening for input stream exceptions.
  • CameraManager class, which provides the capabilities of obtaining camera device objects, creating input/output streams and sessions, and registering or unregistering listeners for camera states.
  • ColorManagement class, which provides the capabilities of checking the support for the color space and setting or querying color space parameters.
  • ControlCenter class, which provides the capabilities of checking the support for the camera controller and enabling the camera controller.
  • Flash class, which provides the capabilities of checking the support for flash functionality and manipulating the flash device.
  • Focus class, which provides the capabilities of checking the support for focus modes on the device and setting focus-related functionalities.
  • Macro class, which provides the capabilities of checking the support for macro photography and enabling macro photography.
  • ManualExposure class, which provides the capabilities of manual exposure.
  • ManualExposureQuery class, which provides the capabilities of querying manual exposure.
  • ManualFocusQuery class, which provides the capabilities of querying manual focus.
  • ManualFocus class, which provides the capabilities of manual focus.
  • ManualIso class, which provides the capabilities of manual ISO setting.
  • ManualIsoQuery class, which provides the capabilities of querying manual ISO setting.
  • MetadataOutput class, which provides the capabilities of registering or unregistering listeners for metadata and starting or stopping metadata streams.
  • OIS class, which provides the capabilities of optical image stabilization (OIS).
  • OISQuery class, which provides the capabilities of querying OIS.
  • Photo class, which is a full-quality image object containing complete information about a photo.
  • PhotoOutput class, which is used in photo sessions to provide photo-related capabilities, such as taking photos, enabling moving-photo capture, and obtaining photo rotation angles.
  • PhotoSession class, which is a regular photo mode session class and provides the capabilities for pre-configuration and session state monitoring.
  • PreviewOutput class, which provides the capabilities of setting the preview stream frame rate and preview rotation angle, and querying the current configuration.
  • SecureSession class, which is a secure mode session class and provides the capabilities of checking the support for secure mode and listening for session states.
  • Session class, which is the base class for sessions and provides a range of APIs from starting to stopping preview streams.
  • Stabilization class, which provides the capabilities of checking the support for stabilization and obtaining or setting the device's stabilization types.
  • VideoOutput class, which provides the capabilities of starting or stopping video streams, and configuring the frame rate and mirroring of video streams.
  • VideoSession class, which is a regular video mode session class and provides the capabilities for pre-configuration and session state monitoring.
  • WhiteBalance class, which provides the capabilities of checking the support for white balance modes and setting WB-related parameters.
  • Zoom class, which provides the capabilities of checking the support for zoom operations and performing zoom operations on the device.
  • Others: property information of the camera device, including video configuration items, photo output capabilities, and flashlight.
  • Enums: camera-related enums and their meanings, including the camera position, flash mode, and smooth zoom mode.

Modules to Import

import { camera } from '@kit.CameraKit';