Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
32d4a157
D
Docs
项目概览
OpenHarmony
/
Docs
大约 1 年 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
32d4a157
编写于
7月 20, 2023
作者:
W
wangzx0705
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix for error code and some api doc problem
Signed-off-by:
N
wangzx0705
<
wangzx0705@thundersoft.com
>
上级
24d940f9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
23 deletion
+19
-23
zh-cn/application-dev/reference/apis/js-apis-audio.md
zh-cn/application-dev/reference/apis/js-apis-audio.md
+19
-23
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-audio.md
浏览文件 @
32d4a157
...
...
@@ -839,8 +839,8 @@ async function createTonePlayerBefore(){
| 名称 | 值 | 说明 |
| :--------------------- | :----- | :-------------------------------------------- |
| VOLUME_UP
| 0 | 向上调节音量。
|
| VOLUME_DOWN
| 1 | 向下调节音量。
|
| VOLUME_UP
| 0 | 向上调节音量。
<br/>
此接口为系统接口。
|
| VOLUME_DOWN
| 1 | 向下调节音量。
<br/>
此接口为系统接口。
|
## AudioManager
...
...
@@ -3031,8 +3031,8 @@ adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback<void
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by callback.
|
| 6800301 | System error
. Return by callback.
|
**示例:**
...
...
@@ -3078,8 +3078,8 @@ adjustVolumeByStep(adjustType: VolumeAdjustType): Promise<void>
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by promise.
|
| 6800301 | System error
. Return by promise.
|
**示例:**
...
...
@@ -3119,8 +3119,8 @@ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustTy
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by callback.
|
| 6800301 | System error
. Return by callback.
|
**示例:**
...
...
@@ -3166,8 +3166,8 @@ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustTy
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by promise.
|
| 6800301 | System error
. Return by promise.
|
**示例:**
...
...
@@ -3185,8 +3185,6 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De
获取音量增益dB值,使用callback方式异步返回结果。
**系统接口:**
该接口为系统接口
**系统能力:**
SystemCapability.Multimedia.Audio.Volume
**参数:**
...
...
@@ -3204,8 +3202,8 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by callback.
|
| 6800301 | System error
. Return by callback.
|
**示例:**
...
...
@@ -3224,8 +3222,6 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De
获取音量增益dB值,使用Promise方式异步返回结果。
**系统接口:**
该接口为系统接口
**系统能力:**
SystemCapability.Multimedia.Audio.Volume
**参数:**
...
...
@@ -3248,8 +3244,8 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | Invalid parameter error |
| 6800301 | System error |
| 6800101 | Invalid parameter error
. Return by promise.
|
| 6800301 | System error
. Return by promise.
|
**示例:**
...
...
@@ -5962,7 +5958,7 @@ audioRenderer.on('stateChange', (state) => {
### on('outputDeviceChange') <sup>10+</sup>
on(type: 'outputDeviceChange', callback: Callback
<AudioDeviceDescriptors
\>
): void
on(type: 'outputDeviceChange', callback: Callback
\<
AudioDeviceDescriptors>): void;
订阅监听音频输出设备变化。
...
...
@@ -5979,7 +5975,7 @@ on(type: 'outputDeviceChange', callback: Callback<AudioDeviceDescriptors\>): voi
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | if input parameter value error |
| 6800101 | if input parameter value error
.
|
**示例:**
...
...
@@ -5994,7 +5990,7 @@ audioRenderer.on('outputDeviceChange', (deviceChangeInfo) => {
```
### off('outputDeviceChange') <sup>10+</sup>
off(type: 'outputDeviceChange', callback?: Callback
<AudioDeviceDescriptors
\>
): void
off(type: 'outputDeviceChange', callback?: Callback
\<
AudioDeviceDescriptors>): void;
取消订阅监听音频输出设备变化。
...
...
@@ -6005,13 +6001,13 @@ off(type: 'outputDeviceChange', callback?: Callback<AudioDeviceDescriptors\>): v
| 参数名 | 类型 | 必填 | 说明 |
| :------- | :------------------------- | :--- | :------------------------------------------ |
| type | string | 是 | 事件回调类型,支持的事件为:'outputDeviceChange'。 |
| callback | Callback
\<
[
AudioDeviceDescriptors
](
#audiodevicedescriptors
)
> |
是
| 取消监听的音频设备变化。 |
| callback | Callback
\<
[
AudioDeviceDescriptors
](
#audiodevicedescriptors
)
> |
否
| 取消监听的音频设备变化。 |
**错误码:**
| 错误码ID | 错误信息 |
| ------- | --------------------------------------------|
| 6800101 | if input parameter value error |
| 6800101 | if input parameter value error
.
|
**示例:**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录