From a2b1d985b4673ed6e5538990b907b55b932c2b75 Mon Sep 17 00:00:00 2001 From: hangliebe Date: Fri, 29 Apr 2022 17:08:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanhang --- api/@ohos.multimedia.audio.d.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index d6f0a0353e..352943ce39 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -1218,6 +1218,16 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device */ readonly deviceType: DeviceType; + /** + * Distributed device id + * @since 8 + */ + readonly netWorkId: string; + /** + * Audio port name + * @since 8 + */ + readonly portName: string; } /** @@ -1252,6 +1262,12 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume */ updateUi: boolean; + /** + * Distributed device id + * @since 8 + * @syscap SystemCapability.Multimedia.Audio + */ + netWorkId: string; } /** -- Gitee From 4c3512aece99f3b787a40923a7ffa53c8a9f6a20 Mon Sep 17 00:00:00 2001 From: hangliebe Date: Thu, 5 May 2022 08:01:21 +0800 Subject: [PATCH 2/4] modify version from 8 to 9 --- api/@ohos.multimedia.audio.d.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 352943ce39..48ca9a3a5d 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -1219,13 +1219,15 @@ declare namespace audio { */ readonly deviceType: DeviceType; /** - * Distributed device id - * @since 8 + * Distributed device id + * @since 9 + * @syscap SystemCapability.Multimedia.Audio */ readonly netWorkId: string; /** * Audio port name - * @since 8 + * @since 9 + * @syscap SystemCapability.Multimedia.Audio */ readonly portName: string; } @@ -1264,7 +1266,7 @@ declare namespace audio { updateUi: boolean; /** * Distributed device id - * @since 8 + * @since 9 * @syscap SystemCapability.Multimedia.Audio */ netWorkId: string; -- Gitee From 4639109c5c9d71a080afceae4b3bb0809f6ff1e6 Mon Sep 17 00:00:00 2001 From: hangliebe Date: Fri, 6 May 2022 09:02:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hangliebe --- api/@ohos.multimedia.audio.d.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 48ca9a3a5d..54a1e88e3a 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -1224,12 +1224,6 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio */ readonly netWorkId: string; - /** - * Audio port name - * @since 9 - * @syscap SystemCapability.Multimedia.Audio - */ - readonly portName: string; } /** -- Gitee From a68d20af01ffd604f68964d5b9c70c97d35db531 Mon Sep 17 00:00:00 2001 From: hangliebe Date: Fri, 6 May 2022 13:45:39 +0800 Subject: [PATCH 4/4] add parameter method for distributed device Signed-off-by: hangliebe --- api/@ohos.multimedia.audio.d.ts | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 54a1e88e3a..c502e2b667 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. -- Gitee