You need to sign in or sign up before continuing.
提交 81c40f55 编写于 作者: Z zengyawen

update docs

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 40cff1e2
...@@ -137,7 +137,7 @@ createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback<Audio ...@@ -137,7 +137,7 @@ createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback<Audio
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| :------- | :---------------------------------------------- | :--- | :--------------- | | :------- | :---------------------------------------------- | :--- | :--------------- |
| options | [AudioCapturerOptions](#AudioCapturerOptions) | 是 | 配置音频采集器。 | | options | [AudioCapturerOptions](#audiocaptureroptions8) | 是 | 配置音频采集器。 |
| callback | AsyncCallback<[AudioCapturer](#audiocapturer8)> | 是 | 音频采集器对象。 | | callback | AsyncCallback<[AudioCapturer](#audiocapturer8)> | 是 | 音频采集器对象。 |
**示例:** **示例:**
...@@ -181,9 +181,9 @@ createAudioCapturer(options: AudioCapturerOptions): Promise<AudioCapturer\> ...@@ -181,9 +181,9 @@ createAudioCapturer(options: AudioCapturerOptions): Promise<AudioCapturer\>
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| :------ | :------------------- | :--- | :--------------- | | :------ | :--------------------------------------------- | :--- | :--------------- |
| options | AudioCapturerOptions | 是 | 配置音频采集器。 | | options | [AudioCapturerOptions](#audiocaptureroptions8) | 是 | 配置音频采集器。 |
**返回值:** **返回值:**
...@@ -571,6 +571,17 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions); ...@@ -571,6 +571,17 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions);
| CONNECT | 0 | 设备连接。 | | CONNECT | 0 | 设备连接。 |
| DISCONNECT | 1 | 断开设备连接。 | | DISCONNECT | 1 | 断开设备连接。 |
## AudioCapturerOptions<sup>8+</sup>
音频采集器选项信息。
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Capturer
| 名称 | 类型 | 必填 | 说明 |
| ------------ | --------------------------------------- | ---- | ---------------- |
| streamInfo | [AudioStreamInfo](#audiostreaminfo8) | 是 | 表示音频流信息。 |
| rendererInfo | [AudioCapturerInfo](#audiocapturerinfo) | 是 | 表示采集器信息。 |
## AudioCapturerInfo<sup>8+</sup><a name="audiocapturerinfo"></a> ## AudioCapturerInfo<sup>8+</sup><a name="audiocapturerinfo"></a>
描述音频采集器信息。 描述音频采集器信息。
...@@ -2698,9 +2709,9 @@ getStreamInfo(callback: AsyncCallback<AudioStreamInfo\>): void ...@@ -2698,9 +2709,9 @@ getStreamInfo(callback: AsyncCallback<AudioStreamInfo\>): void
**参数:** **参数:**
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| :------- | :-------------------------------------------------------- | :--- | :------------------------------- | | :------- | :--------------------------------------------------- | :--- | :------------------------------- |
| callback | AsyncCallback<[AudioStreamInfo](#AudioRendererOptions8)\> | 是 | 使用callback方式异步返回流信息。 | | callback | AsyncCallback<[AudioStreamInfo](#audiostreaminfo8)\> | 是 | 使用callback方式异步返回流信息。 |
**示例:** **示例:**
...@@ -2728,9 +2739,9 @@ getStreamInfo(): Promise<AudioStreamInfo\> ...@@ -2728,9 +2739,9 @@ getStreamInfo(): Promise<AudioStreamInfo\>
**返回值:** **返回值:**
| 类型 | 说明 | | 类型 | 说明 |
| :-------------------------------------------------- | :------------------------------ | | :--------------------------------------------- | :------------------------------ |
| Promise<[AudioStreamInfo](#AudioRendererOptions8)\> | 使用Promise方式异步返回流信息。 | | Promise<[AudioStreamInfo](#audiostreaminfo8)\> | 使用Promise方式异步返回流信息。 |
**示例:** **示例:**
......
...@@ -1346,6 +1346,12 @@ setSpeed(speed:number): Promise\<number> ...@@ -1346,6 +1346,12 @@ setSpeed(speed:number): Promise\<number>
| ------ | ------ | ---- | ---------------------------------------------------------- | | ------ | ------ | ---- | ---------------------------------------------------------- |
| speed | number | 是 | 指定播放视频速度,具体见[PlaybackSpeed](#playbackspeed8)。 | | speed | number | 是 | 指定播放视频速度,具体见[PlaybackSpeed](#playbackspeed8)。 |
**返回值:**
| 类型 | 说明 |
| ---------------- | ------------------------- |
| Promise\<number> | 通过Promise获取设置结果。 |
**示例:** **示例:**
```js ```js
...@@ -1632,7 +1638,7 @@ audioRecorder.pause(); ...@@ -1632,7 +1638,7 @@ audioRecorder.pause();
resume():void resume():void
暂停录制,需要在[pause](#audiorecorder_on)事件成功触发后,才能调用resume方法。 恢复录制,需要在[pause](#audiorecorder_on)事件成功触发后,才能调用resume方法。
**系统能力:** SystemCapability.Multimedia.Media.AudioRecorder **系统能力:** SystemCapability.Multimedia.Media.AudioRecorder
...@@ -1797,7 +1803,7 @@ audioRecorder.prepare(); // prepare不设置参数,触发'error' ...@@ -1797,7 +1803,7 @@ audioRecorder.prepare(); // prepare不设置参数,触发'error'
| numberOfChannels | number | 否 | 音频采集声道数,默认值为2。 | | numberOfChannels | number | 否 | 音频采集声道数,默认值为2。 |
| format | [AudioOutputFormat](#audiooutputformat) | 否 | 音量输出封装格式,默认设置为MPEG_4。 | | format | [AudioOutputFormat](#audiooutputformat) | 否 | 音量输出封装格式,默认设置为MPEG_4。 |
| location<sup>8+</sup> | [Location](#location8) | 否 | 音频采集的地理位置。 | | location<sup>8+</sup> | [Location](#location8) | 否 | 音频采集的地理位置。 |
| uri | string | 是 | 频输出URI:fd://xx&nbsp;(fd&nbsp;number)<br/>![zh-cn_image_0000001164217678](figures/zh-cn_image_url.png) <br/>文件需要由调用者创建,并赋予适当的权限。 | | uri | string | 是 | 频输出URI:fd://xx&nbsp;(fd&nbsp;number)<br/>![zh-cn_image_0000001164217678](figures/zh-cn_image_url.png) <br/>文件需要由调用者创建,并赋予适当的权限。 |
| audioEncoderMime | [CodecMimeType](#codecmimetype8) | 否 | 音频编码格式。 | | audioEncoderMime | [CodecMimeType](#codecmimetype8) | 否 | 音频编码格式。 |
...@@ -2401,7 +2407,7 @@ on(type: 'error', callback: ErrorCallback): void ...@@ -2401,7 +2407,7 @@ on(type: 'error', callback: ErrorCallback): void
| 参数名 | 类型 | 必填 | 说明 | | 参数名 | 类型 | 必填 | 说明 |
| -------- | ------------- | ---- | ------------------------------------------------------------ | | -------- | ------------- | ---- | ------------------------------------------------------------ |
| type | string | 是 | 录制错误事件回调类型'error'。<br/>-&nbsp;'error':频录制过程中发生错误,触发该事件。 | | type | string | 是 | 录制错误事件回调类型'error'。<br/>-&nbsp;'error':频录制过程中发生错误,触发该事件。 |
| callback | ErrorCallback | 是 | 录制错误事件回调方法。 | | callback | ErrorCallback | 是 | 录制错误事件回调方法。 |
**示例:** **示例:**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册