openharmony 鸿蒙 arkts-apis-camera-ApertureQuery

2026-08-25 浏览 (1)

Interface (ApertureQuery)

物理光圈查询对象。

说明:

  • 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
  • 本Interface首批接口从API version 24开始支持。

导入模块

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

getSupportedPhysicalApertures24+

getSupportedPhysicalApertures(): Array<PhysicalAperture>

获取支持的物理光圈。

原子化服务API: 从API version 24开始,该接口支持在原子化服务中使用。

系统能力: SystemCapability.Multimedia.Camera.Core

返回值:

类型说明
Array<PhysicalAperture>支持的物理光圈数组。

错误码:

以下错误码的详细介绍请参见Camera错误码

错误码ID错误信息
7400102Operation not allowed, the inputDevice or the session is abnormal.
7400103Session not config.

示例:

import { BusinessError } from '@kit.BasicServicesKit';

function getSupportedPhysicalApertures(photoSession: camera.PhotoSession): Array<camera.PhysicalAperture> {
  let apertures: Array<camera.PhysicalAperture> = [];
  try {
    apertures = photoSession.getSupportedPhysicalApertures();
  } catch (error) {
    // 失败返回错误码error.code并处理。
    let err = error as BusinessError;
    console.error(`The getSupportedPhysicalApertures call failed. error code: ${err.code}`);
  }
  return apertures;
}

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks

openharmony 鸿蒙 arkts-apis-camera-OIS

openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo

openharmony 鸿蒙 capi-oh-camera-camera-frameraterange

openharmony 鸿蒙 capi-oh-camera-camera-outputcapability

openharmony 鸿蒙 arkts-apis-camera-Photo

openharmony 鸿蒙 capi-oh-camera-camera-profile

openharmony 鸿蒙 capi-oh-camera-camera-manager

openharmony 鸿蒙 capi-oh-camera-previewoutput-callbacks

openharmony 鸿蒙 arkts-apis-camera-ManualExposureQuery

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/ezQyJh8w