diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index d6f0a0353e7177c57203f20e1b8827c96ccdc833..c502e2b667c17f659be912112b742d649b25d03c 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -1076,6 +1076,50 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core */ getAudioParameter(key: string): Promise; + /** + * Sets an distributed audio parameter. This method uses an asynchronous callback to return the result. + * @param netWorkId the distributed device net id. + * @param key Key of the distributed audio parameter to set. + * @param value Value of the distributed audio parameter to set. + * @param callback Callback used to return the result. + * @since 8 + * @syscap SystemCapability.Multimedia.Audio.Core + * @permission ohos.permission.MODIFY_AUDIO_SETTINGS + * @systemapi + */ + setDistributedAudioParm(netWorkId: string, key: string, value: string, callback: AsyncCallback): void; + /** + * Sets an distributed audio parameter. This method uses a promise to return the result. + * @param netWorkId the distributed device id. + * @param key Key of the distributed audio parameter to set. + * @param value Value of the distributed audio parameter to set. + * @return Promise used to return the result. + * @since 8 + * @syscap SystemCapability.Multimedia.Audio.Core + * @permission ohos.permission.MODIFY_AUDIO_SETTINGS + * @systemapi + */ + setDistributedAudioParm(netWorkId: string, key: string, value: string): Promise; + /** + * Obtains the value of an distributed audio parameter. This method uses an asynchronous callback to return the query result. + * @param netWorkId the distributed device id. + * @param key Key of the distributed audio parameter whose value is to be obtained. + * @param callback Callback used to return the value of the distributed audio parameter. + * @since 8 + * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi + */ + getDistributedAudioParm(netWorkId: string, key: string, callback: AsyncCallback): void; + /** + * Obtains the value of an distributed audio parameter. This method uses a promise to return the query result. + * @param netWorkId the distributed device id. + * @param key Key of the distributed audio parameter whose value is to be obtained. + * @return Promise used to return the value of the distributed audio parameter. + * @since 8 + * @syscap SystemCapability.Multimedia.Audio.Core + * @systemapi + */ + getDistributedAudioParm(netWorkId: string, key: string): Promise; /** * Sets a device to the active state. This method uses an asynchronous callback to return the result. * @param deviceType Audio device type. @@ -1218,6 +1262,12 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device */ readonly deviceType: DeviceType; + /** + * Distributed device id + * @since 9 + * @syscap SystemCapability.Multimedia.Audio + */ + readonly netWorkId: string; } /** @@ -1252,6 +1302,12 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume */ updateUi: boolean; + /** + * Distributed device id + * @since 9 + * @syscap SystemCapability.Multimedia.Audio + */ + netWorkId: string; } /**