From b7797d01f14a7da566def878bd81e811c7e0a8f1 Mon Sep 17 00:00:00 2001 From: jiaoyanlin3 Date: Wed, 26 Jul 2023 14:29:12 +0800 Subject: [PATCH] Audio consistency Signed-off-by: jiaoyanlin3 --- .../reference/apis/js-apis-audio.md | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-audio.md b/zh-cn/application-dev/reference/apis/js-apis-audio.md index bef6d50e4a..43a8c20e11 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-audio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-audio.md @@ -533,7 +533,6 @@ async function createTonePlayerBefore(){ | CONTENT_TYPE_MOVIE | 3 | 电影。 | | CONTENT_TYPE_SONIFICATION | 4 | 通知音。 | | CONTENT_TYPE_RINGTONE8+ | 5 | 铃声。 | -| CONTENT_TYPE_ULTRASONIC10+| 9 | 超声波。
此接口为系统接口。| ## StreamUsage 枚举,音频流使用类型。 @@ -6680,6 +6679,34 @@ async function onAudioInterrupt(){ } ``` +### off('audioInterrupt')10+ + +on(type: 'audioInterrupt'): void + +取消订阅音频中断事件。 + +**系统能力:** SystemCapability.Multimedia.Audio.Interrupt + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | -------------------------------------------- | ---- | ------------------------------------------------------------ | +| type | string | 是 | 事件回调类型,支持的事件为:'audioInterrupt' | + +**错误码:** + +以下错误码的详细介绍请参见[音频错误码](../errorcodes/errorcode-audio.md)。 + +| 错误码ID | 错误信息 | +| ------- | --------------------------------------------| +| 6800101 | if input parameter value error | + +**示例:** + +```js +audioCapturer.off('audioInterrupt'); +``` + ### on('markReach')8+ -- GitLab