harmony 鸿蒙Interface (AutoDeviceSwitchQuery)

  • 2025-06-12
  • 浏览 (5)

Interface (AutoDeviceSwitchQuery)

说明:

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

自动切换镜头查询类,用于查询设备是否支持自动切换镜头。

isAutoDeviceSwitchSupported13+

isAutoDeviceSwitchSupported(): boolean

查询设备是否支持自动切换镜头能力。

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

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

返回值:

类型 说明
boolean 是否支持自动切换镜头,true为支持,false为不支持。

示例:

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

function isAutoDeviceSwitchSupported(session: camera.PhotoSession): boolean {
  let isSupported = false;
  isSupported = session.isAutoDeviceSwitchSupported();
  return isSupported;
}

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Camera Kit(相机服务)

harmony 鸿蒙Interface (AutoDeviceSwitch)

harmony 鸿蒙Interface (AutoExposure)

harmony 鸿蒙Interface (AutoExposureQuery)

harmony 鸿蒙Interface (CameraInput)

harmony 鸿蒙Interface (CameraManager)

harmony 鸿蒙Interface (CameraOutput)

harmony 鸿蒙废弃的Interface (CaptureSession, deprecated)

harmony 鸿蒙Interface (ColorManagement)

harmony 鸿蒙Interface (ColorManagementQuery)

0  赞