openharmony 鸿蒙 camera-system-pressure

2026-08-25 浏览 (1)

Pressure Management (ArkTS)

Starting from API version 20, the camera framework supports monitoring of system pressure levels.

In scenarios requiring prolonged camera usage (such as live streaming), applications can dynamically adjust image quality parameters (such as the frame rate or resolution) based on system pressure level changes. This helps balance power consumption, heat generation, and system load, ensuring stable and extended camera functionality.

Status Listening

To monitor system pressure status changes, register the systemPressureLevelChange callback.

When the system pressure level changes, the callback returns the SystemPressureLevel parameter.

For details about this parameter, see SystemPressureLevel.

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

function callback(err: BusinessError, systemPressureLevel: camera.SystemPressureLevel): void {
  if (err !== undefined && err.code !== 0) {
    console.error(`Callback Error, errorCode: ${err.code}`);
    return;
  }
  console.info(`systemPressureLevel: ${systemPressureLevel}`);
}

function registerSystemPressureLevelChangeCallback(photoSession: camera.PhotoSession): void {
    photoSession.on('systemPressureLevelChange', callback);
}

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 camera-whitebalance

openharmony 鸿蒙 native-camera-preview

openharmony 鸿蒙 camera-worker

openharmony 鸿蒙 camera-background-recovery

openharmony 鸿蒙 camera-preparation

openharmony 鸿蒙 camera-shooting

openharmony 鸿蒙 camera-moving-photo

openharmony 鸿蒙 native-camera-preview-imageReceiver

openharmony 鸿蒙 native-camera-shooting

openharmony 鸿蒙 camera-recording-case

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