openharmony 鸿蒙 changelogs-multimedia

2025-06-12 浏览 (1)

Multimedia Subsystem Changelog

cl.multimedia.1 getDevices Changed

Access Level

Public

Reason for Change

getDevices returns a device with an earpiece only when the device is in a call.

Change Impact

When DeviceFlag is set to OUTPUT_DEVICES_FLAG or ALL_DEVICES_FLAG, the return value contains a device with an earpiece even when the device is not in a call.

Change Since

OpenHarmony SDK 4.1.5.1

Key API/Component Changes

Before change:

getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback): void;

getDevices(deviceFlag: DeviceFlag): Promise;

When DeviceFlag is set to OUTPUT_DEVICES_FLAG or ALL_DEVICES_FLAG, the return value contains a device with an earpiece only in the call scenario.

After change:

getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback): void;

getDevices(deviceFlag: DeviceFlag): Promise;

When DeviceFlag is set to OUTPUT_DEVICES_FLAG or ALL_DEVICES_FLAG, the return value contains a device with an earpiece even not in the call scenario.

Adaptation Guide

Add the logic for determining whether a device contains an earpiece in your code.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙MSDP Subsystem Changelog

harmony 鸿蒙USB Subsystem Changelog

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