提交 25fa7b33 编写于 作者: Z zengyawen

update docs

Signed-off-by: Nzengyawen <zengyawen1@huawei.com>
上级 862f6716
......@@ -477,7 +477,7 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions);
| 名称 | 类型 | 必填 | 说明 |
| ------------- | --------------------------- | ---- | ---------------- |
| contentType | [ContentType](#contenttype) | 是 | 媒体类型。 |
| content | [ContentType](#contenttype) | 是 | 媒体类型。 |
| usage | [StreamUsage](#streamusage) | 是 | 音频流使用类型。 |
| rendererFlags | number | 是 | 音频渲染器标志。 |
......@@ -580,7 +580,7 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions);
| 名称 | 类型 | 必填 | 说明 |
| ------------ | --------------------------------------- | ---- | ---------------- |
| streamInfo | [AudioStreamInfo](#audiostreaminfo8) | 是 | 表示音频流信息。 |
| rendererInfo | [AudioCapturerInfo](#audiocapturerinfo) | 是 | 表示采集器信息。 |
| capturerInfo | [AudioCapturerInfo](#audiocapturerinfo) | 是 | 表示采集器信息。 |
## AudioCapturerInfo<sup>8+</sup><a name="audiocapturerinfo"></a>
......@@ -599,10 +599,11 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions);
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Core
| 名称 | 默认值 | 描述 |
| :------------------ | :----- | :------------- |
| SOURCE_TYPE_INVALID | -1 | 无效的音频源。 |
| SOURCE_TYPE_MIC | 0 | Mic音频源。 |
| 名称 | 默认值 | 描述 |
| :------------------------------ | :----- | :----------------------------------------------------------- |
| SOURCE_TYPE_INVALID | -1 | 无效的音频源。 |
| SOURCE_TYPE_MIC | 0 | Mic音频源。 |
| SOURCE_TYPE_VOICE_COMMUNICATION | 7 | 语音通话场景的音频源。<br/>本接口在OpenHarmony 3.1 Release版本仅为接口定义,暂不支持使用。接口将在OpenHarmony 3.1 MR版本中提供使用支持。 |
## AudioScene<sup>8+</sup><a name="audioscene"></a>
......@@ -610,12 +611,12 @@ let audioCapturer = await audio.createAudioCapturer(audioCapturerOptions);
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Communication
| 名称 | 默认值 | 描述 |
| :------------------------------------------------- | :----- | :------------- |
| AUDIO_SCENE_DEFAULT | 0 | 默认音频场景。 |
| AUDIO_SCENE_RINGING(系统接口,三方应用不支持) | 1 | 响铃模式。 |
| AUDIO_SCENE_PHONE_CALL(系统接口,三方应用不支持) | 2 | 电话模式。 |
| AUDIO_SCENE_VOICE_CHAT | 3 | 语音聊天模式。 |
| 名称 | 默认值 | 描述 |
| :--------------------- | :----- | :-------------------------------------------- |
| AUDIO_SCENE_DEFAULT | 0 | 默认音频场景。 |
| AUDIO_SCENE_RINGING | 1 | 响铃模式。<br/>系统接口,三方应用不支持调用。 |
| AUDIO_SCENE_PHONE_CALL | 2 | 电话模式。<br/>系统接口,三方应用不支持调用。 |
| AUDIO_SCENE_VOICE_CHAT | 3 | 语音聊天模式。 |
## AudioManager
......@@ -1738,7 +1739,7 @@ setAudioScene\(scene: AudioScene\): Promise<void\>
此接口为系统接口,三方应用不支持。
**系统能力:**: SystemCapability.Multimedia.Audio.Communication
**系统能力:** SystemCapability.Multimedia.Audio.Communication
**Parameters**
......@@ -1768,7 +1769,7 @@ getAudioScene\(callback: AsyncCallback<AudioScene\>\): void
获取音频场景模式,使用callback方式返回异步结果。
**系统能力:**SystemCapability.Multimedia.Audio.Communication
**系统能力:** SystemCapability.Multimedia.Audio.Communication
**参数:**
......@@ -3177,7 +3178,7 @@ on(type: 'stateChange', callback: Callback<AudioState\>): void
| 参数名 | 类型 | 必填 | 说明 |
| :------- | :------------------------- | :--- | :------------------------------------------ |
| type | string | 是 | 事件回调类型,支持的事件为:'stateChange'。 |
| callback | [AudioState](#AudioState8) | 是 | 返回监听的状态。 |
| callback | [AudioState](#audiostate8) | 是 | 返回监听的状态。 |
**示例:**
......
......@@ -10,9 +10,9 @@ import image from '@ohos.multimedia.image';
```
## image.createPixelMap<sup>8+</sup>
createPixelMap(colors: ArrayBuffer, opts: InitializetionOptions): Promise\<PixelMap>
createPixelMap(colors: ArrayBuffer, options: InitializetionOptions): Promise\<PixelMap>
通过属性创建Pixelmap,通过Promise返回结果。
通过属性创建PixelMap,通过Promise返回结果。
**系统能力:** SystemCapability.Multimedia.Image
......@@ -21,13 +21,13 @@ createPixelMap(colors: ArrayBuffer, opts: InitializetionOptions): Promise\<Pixel
| 名称 | 类型 | 必填 | 说明 |
| ------- | ------------------------------------------------ | ---- | ------------------------------------------------------------ |
| colors | ArrayBuffer | 是 | 颜色数组。 |
| options | [InitializetionOptions](#InitializationOptions8) | 是 | 创建像素的属性,包括透明度,尺寸,缩略值,像素格式和是否可编辑。 |
| options | [InitializetionOptions](#initializationoptions8) | 是 | 创建像素的属性,包括透明度,尺寸,缩略值,像素格式和是否可编辑。 |
**返回值:**
| 类型 | 说明 |
| -------------------------------- | -------------- |
| Promise\<[PixelMap](#pixelmap7)> | 返回pixelmap。 |
| Promise\<[PixelMap](#pixelmap7)> | 返回Pixelmap。 |
**示例:**
......@@ -43,17 +43,17 @@ image.createPixelMap(Color, opts)
createPixelMap(colors: ArrayBuffer, opts: InitializetionOptions) callback: AsyncCallback\<PixelMap>): void
通过属性创建Pixelmap,通过回调函数返回结果。
通过属性创建PixelMap,通过回调函数返回结果。
**系统能力:** SystemCapability.Multimedia.Image
**参数:**
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------------ | ---- | -------------------- |
| colors | ArrayBuffer | 是 | 颜色数组。 |
| options | [InitializetionOptions](#InitializationOptions8) | 是 | 属性。 |
| callback | AsyncCallback\<[PixelMap](#pixelmap7)> | 是 | 回调表示成功或失败。 |
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------------ | ---- | -------------------------- |
| colors | ArrayBuffer | 是 | 颜色数组。 |
| options | [InitializetionOptions](#initializationoptions8) | 是 | 属性。 |
| callback | AsyncCallback\<[PixelMap](#pixelmap7)> | 是 | 通过回调返回PixelMap对象。 |
**示例:**
......@@ -255,7 +255,7 @@ writePixels(area: PositionArea): Promise\<void>
| 参数名 | 类型 | 必填 | 说明 |
| ------ | ------------------------------ | ---- | -------------------- |
| area | [PositionArea](#PositionArea7) | 是 | 区域,根据区域写入。 |
| area | [PositionArea](#positionarea7) | 是 | 区域,根据区域写入。 |
**返回值:**
......@@ -285,7 +285,7 @@ writePixels(area: PositionArea, callback: AsyncCallback\<void>): void
| 参数名 | 类型 | 必填 | 说明 |
| --------- | ------------------------------ | ---- | ------------------------------ |
| area | [PositionArea](#PositionArea7) | 是 | 区域,根据区域写入。 |
| area | [PositionArea](#positionarea7) | 是 | 区域,根据区域写入。 |
| callback: | AsyncCallback\<void> | 是 | 获取回调,失败时返回错误信息。 |
**示例:**
......@@ -335,7 +335,7 @@ pixelMap.writeBufferToPixels(colorBuffer).then(() => {
writeBufferToPixels(src: ArrayBuffer, callback: AsyncCallback\<void>): void
读取缓冲区中的图片数据,结果写入Pixelmap中,使用Promise形式返回。
读取缓冲区中的图片数据,结果写入Pixelmap中,使用callback形式返回。
**系统能力:** SystemCapability.Multimedia.Image
......@@ -739,11 +739,11 @@ createPixelMap(index: number, options: DecodingOptions, callback: AsyncCallback\
**参数:**
| 名称 | 类型 | 必填 | 说明 |
| ------------- | ------------------------------------- | ---- | -------------------- |
| options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| index | number | 是 | 图片索引。 |
| AsyncCallback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 回调表示成功或失败。 |
| 名称 | 类型 | 必填 | 说明 |
| ------------- | ------------------------------------- | ---- | -------------------------- |
| options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| index | number | 是 | 图片索引。 |
| AsyncCallback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 通过回调返回PixelMap对象。 |
**示例:**
......@@ -765,10 +765,10 @@ createPixelMap(options: DecodingOptions, callback: AsyncCallback\<PixelMap>): vo
**参数:**
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------- | ---- | -------------------- |
| options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| callback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 回调表示成功或失败。 |
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------- | ---- | -------------------------- |
| options | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| callback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 通过回调返回PixelMap对象。 |
**示例:**
......@@ -798,10 +798,10 @@ createPixelMap(opts: DecodingOptions, callback: AsyncCallback\<PixelMap>): void
**参数:**
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------- | ---- | -------------------- |
| opts | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| callback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 回调表示成功或失败。 |
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------- | ---- | -------------------------- |
| opts | [DecodingOptions](#decodingoptions7) | 是 | 解码参数。 |
| callback | AsyncCallback<[PixelMap](#pixelmap7)> | 是 | 通过回调返回PixelMap对象。 |
**示例:**
......@@ -881,9 +881,9 @@ createImagePacker(): ImagePacker
**返回值:**
| 类型 | 说明 |
| ----------- | ---------------------- |
| ImagePacker | 返回ImagePackers实例。 |
| 类型 | 说明 |
| --------------------------- | --------------------- |
| [ImagePacker](#imagepacker) | 返回ImagePacker实例。 |
**示例:**
......@@ -1098,14 +1098,14 @@ imagePackerApi.release();
| 名称 | 类型 | 可读 | 可写 | 说明 |
| ------------------ | ---------------------------------- | ---- | ---- | ---------------- |
| sampleSize | number | 是 | 是 | 缩略图采样大小。 |
| rotateDegrees | number | 是 | 是 | 旋转角度。 |
| rotate | number | 是 | 是 | 旋转角度。 |
| editable | boolean | 是 | 是 | 是否可编辑。 |
| desiredSize | [Size](#size) | 是 | 是 | 期望输出大小。 |
| desiredRegion | [Region](#region8) | 是 | 是 | 解码区域。 |
| desiredRegion | [Region](#region7) | 是 | 是 | 解码区域。 |
| desiredPixelFormat | [PixelMapFormat](#pixelmapformat7) | 是 | 是 | 解码的像素格式。 |
| index | numer | 是 | 是 | 解码图片序号 |
## Region<sup>8+</sup>
## Region<sup>7+</sup>
表示区域信息。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册