From d3ccf81fe3fec6814096a32982f6f2ea9f8c8136 Mon Sep 17 00:00:00 2001 From: zhangwt3652 Date: Fri, 13 Jun 2025 11:02:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3OpenHarmony=5Ffeature=5Frelea?= =?UTF-8?q?se=5F20250603=E5=88=86=E6=94=AF=E7=9A=84xts=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangwt3652 --- api/@ohos.multimedia.audio.d.ts | 14 ++++++++++ api/multimedia/soundPool.d.ts | 47 +++++++++++++-------------------- 2 files changed, 33 insertions(+), 28 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 6389c98849..4e9a3a755f 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -825,6 +825,20 @@ declare namespace audio { * @arkts 1.1&1.2 */ USB_DEVICE = 25, + /** + * HDMI device, such as HDMI, ARC, eARC + * @syscap SystemCapability.Multimedia.Audio.Device + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + HDMI = 27, + /** + * Line connected digital output device, such as s/pdif + * @syscap SystemCapability.Multimedia.Audio.Device + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + LINE_DIGITAL = 28, /** * Distributed virtualization audio device. * @syscap SystemCapability.Multimedia.Audio.Device diff --git a/api/multimedia/soundPool.d.ts b/api/multimedia/soundPool.d.ts index 3ffd0b1176..d0b2a1036a 100644 --- a/api/multimedia/soundPool.d.ts +++ b/api/multimedia/soundPool.d.ts @@ -389,79 +389,70 @@ export interface SoundPool { * @param {'loadComplete'} type Type of the play finish event to listen for. * @param {Callback} callback Callback used to listen for load result event * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// on(type: 'loadComplete', callback: Callback): void; + on(type: 'loadComplete', callback: Callback): void; /** * Cancel Listens for load result event. * * @param {'loadComplete'} type Type of the play finish event to listen for. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// off(type: 'loadComplete'): void; + off(type: 'loadComplete'): void; /** * Register the listener for playing finished event. The conditions which this event is called * are the same as {@link #playFinished}, additionally, this event can callback the streamId of finishing playing. * If this event and the {@link #playFinished} event are registered at the same time, * only this event will be called, and the {@link #playFinished} event will not be called. * - * @param {'playFinishedWithStreamId' | 'playFinished' | 'error' | 'loadComplete'} type name of the play finished event to listen for. - * @param {Callback | Callback | ErrorCallback} callback Callback used to listen which stream id has finished playback. + * @param {'playFinishedWithStreamId'} type name of the play finished event to listen for. + * @param {Callback} callback Callback used to listen which stream id has finished playback. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - on(type: 'playFinishedWithStreamId' | 'playFinished' | 'error' | 'loadComplete', - callback: Callback | Callback | ErrorCallback): void; + on(type: 'playFinishedWithStreamId', callback: Callback): void; /** * Cancel listening for playing finished event. * - * @param {'playFinishedWithStreamId' | 'loadComplete' | 'playFinished' | 'error'} type name of the play finished event to listen for. + * @param {'playFinishedWithStreamId'} type name of the play finished event to listen for. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - off(type: 'playFinishedWithStreamId' | 'loadComplete' | 'playFinished' | 'error'): void; + off(type: 'playFinishedWithStreamId'): void; /** * Register listens for play finish event. * * @param {'playFinished'} type Type of the play finish event to listen for. * @param {Callback} callback Callback used to listen for the play finish * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// on(type: 'playFinished', callback: Callback): void; + on(type: 'playFinished', callback: Callback): void; /** * Cancel Listens for play finish event. * * @param {'playFinished'} type of the play finish event to listen for. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// off(type: 'playFinished'): void; + off(type: 'playFinished'): void; /** * Register listens for sound play error events. * * @param {'error'} type Type of the sound play error event to listen for. * @param {ErrorCallback} callback Callback used to listen for sound play error events. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// on(type: 'error', callback: ErrorCallback): void; + on(type: 'error', callback: ErrorCallback): void; /** * Cancel Listens for sound play error events. * * @param {'error'} type Type of the sound play error event to listen for. * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ -// off(type: 'error'): void; + off(type: 'error'): void; } -- Gitee