未验证 提交 76846da5 编写于 作者: O openharmony_ci 提交者: Gitee

!5242 翻译完成:4609 一致性+敏感词修改

Merge pull request !5242 from wusongqing/TR4609V2
......@@ -467,8 +467,6 @@ Enumerates the hints provided along with audio interruption.
Enumerates the returned event types for audio interruption events.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
| Name | Default Value| Description |
......@@ -528,8 +526,6 @@ Describes the interruption event received by the application when playback is in
Describes input parameters of audio interruption events.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
| Name | Type | Mandatory| Description |
......@@ -542,8 +538,6 @@ This API is defined but not implemented in OpenHarmony 3.1 Release. It will be a
Describes the callback invoked for audio interruption or focus gain events.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
| Name | Type | Mandatory| Description |
......@@ -617,11 +611,11 @@ Enumerates the audio source types.
**System capability**: SystemCapability.Multimedia.Audio.Core
| Name | Default Value| Description |
| :------------------------------ | :----- | :----------------------------------------------------------- |
| SOURCE_TYPE_INVALID | -1 | Invalid audio source. |
| SOURCE_TYPE_MIC | 0 | Mic source. |
| SOURCE_TYPE_VOICE_COMMUNICATION | 7 | Voice communication source.<br>This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.|
| Name | Default Value| Description |
| :------------------------------ | :----- | :--------------------- |
| SOURCE_TYPE_INVALID | -1 | Invalid audio source. |
| SOURCE_TYPE_MIC | 0 | Mic source. |
| SOURCE_TYPE_VOICE_COMMUNICATION | 7 | Voice communication source.|
## AudioScene<sup>8+</sup><a name="audioscene"></a>
......@@ -1605,8 +1599,6 @@ off(type: 'deviceChange', callback?: Callback<DeviceChangeAction\>): void
Unsubscribes from device change events.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Device
**Parameters**
......@@ -1630,8 +1622,6 @@ on(type: 'interrupt', interrupt: AudioInterrupt, callback: Callback\<InterruptAc
Subscribes to audio interruption events. When the application's audio is interrupted by another playback event, the application will receive the callback.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
**Parameters**
......@@ -1668,15 +1658,13 @@ off(type: 'interrupt', interrupt: AudioInterrupt, callback?: Callback\<Interrupt
Unsubscribes from audio interruption events.
This API is defined but not implemented in OpenHarmony 3.1 Release. It will be available for use in OpenHarmony 3.1 MR.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
**Parameters**
| Name | Type | Mandatory| Description |
| --------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| type | string | Yes | Type of event to subscribe to. The value **interrupt** means the audio interruption event, which is triggered when the audio playback of the current application is interrupted by another application.|
| type | string | Yes | Type of event to unsubscribe from. The value **interrupt** means the audio interruption event, which is triggered when the audio playback of the current application is interrupted by another application.|
| interrupt | AudioInterrupt | Yes | Audio interruption event type. |
| callback | Callback<[InterruptAction](#interruptaction)> | No | Callback invoked for the audio interruption event. |
......@@ -1853,19 +1841,13 @@ promise.then(function (value) {
Provides APIs for audio rendering. Before calling any API in **AudioRenderer**, you must use [createAudioRenderer](#audiocreateaudiorenderer8) to create an **AudioRenderer** instance.
**System capability**: SystemCapability.Multimedia.Audio.Renderer
### Attributes
### state<sup>8+</sup>
Readonly state: AudioState
Defines the state of the audio renderer.
**Parameters**
**System capability**: SystemCapability.Multimedia.Audio.Renderer
| Name | Type | Readable| Writable| Description |
| ----- | -------------------------- | ---- | ---- | ------------------ |
| state | [AudioState](#audiostate8) | Yes | No | Audio renderer state.|
| state<sup>8+</sup> | [AudioState](#audiostate8) | Yes | No | Audio renderer state.|
**Example**
......@@ -2668,17 +2650,13 @@ audioRenderer.on('stateChange', (state) => {
Provides APIs for audio capture. Before calling any API in **AudioCapturer**, you must use [createAudioCapturer](#audiocreateaudiocapturer8) to create an **AudioCapturer** instance.
### state<sup>8+</sup>
Readonly state: AudioState
Defines the audio capturer state.
### Attributes
**System capability**: SystemCapability.Multimedia.Audio.Capturer
| Name | Type | Readable| Writable| Description |
| :---- | :------------------------- | :--- | :--- | :--------------- |
| state | [AudioState](#audiostate8) | Yes | No | Audio capturer state.|
| state<sup>8+</sup> | [AudioState](#audiostate8) | Yes| No | Audio capturer state.|
**Example**
......@@ -3204,7 +3182,7 @@ Subscribes to mark reached events. When the period of frame capturing reaches th
| Name | Type | Mandatory| Description |
| :------- | :----------------------- | :--- | :------------------------------------------ |
| type | string | Yes | Type of event to subscribe to. The value **periodReach** means the period reached event, which is triggered when the period of frame capturing reaches the value of the **frame** parameter.|
| frame | number | Yes | Number of frames to trigger the event. The value must be greater than **0**. |
| frame | number | Yes | Period during which frame rendering is listened. The value must be greater than **0**. |
| callback | (position: number) => {} | Yes | Callback invoked when the event is triggered. |
**Example**
......
......@@ -12,7 +12,7 @@ import image from '@ohos.multimedia.image';
```
## image.createPixelMap<sup>8+</sup>
createPixelMap(colors: ArrayBuffer, options: InitializetionOptions): Promise\<PixelMap>
createPixelMap(colors: ArrayBuffer, options: InitializationOptions): Promise\<PixelMap>
Creates a **PixelMap** object. This API uses a promise to return the result.
......@@ -41,7 +41,7 @@ image.createPixelMap(Color, opts)
## image.createPixelMap<sup>8+</sup>
createPixelMap(colors: ArrayBuffer, options: InitializetionOptions, callback: AsyncCallback\<PixelMap>): void
createPixelMap(colors: ArrayBuffer, options: InitializationOptions, callback: AsyncCallback\<PixelMap>): void
Creates a **PixelMap** object. This API uses an asynchronous callback to return the result.
......@@ -470,7 +470,7 @@ Creates an **ImageSource** instance based on the URI.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------- |
| uri | string | Yes | Image source URI. Currently, only the local absolute path is supported.|
| uri | string | Yes | Image path. Currently, only the application sandbox path is supported.|
**Return value**
......@@ -481,7 +481,8 @@ Creates an **ImageSource** instance based on the URI.
**Example**
```js
const imageSourceApi = image.createImageSource('/data/local/tmp/test.jpg')
let path = this.context.getApplicationContext().fileDirs + "test.jpg";
const imageSourceApi = image.createImageSource(path);
```
## image.createImageSource<sup>7+</sup>
......@@ -801,7 +802,7 @@ Provide APIs to pack images. Before calling any API in **ImagePacker**, you must
### packing
packing(source: ImageSource, option: PackingOption, callback: AsyncCallback<Array\<ArrayBuffer>>): void
packing(source: ImageSource, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void
Packs an image. This API uses an asynchronous callback to return the result.
......@@ -813,7 +814,7 @@ Packs an image. This API uses an asynchronous callback to return the result.
| -------- | ---------------------------------- | ---- | ---------------------------------- |
| source | [ImageSource](#imagesource) | Yes | Image to pack. |
| option | [PackingOption](#packingoption) | Yes | Option for image packing. |
| callback | AsyncCallback<Array\<ArrayBuffer>> | Yes | Callback used to return the packed data.|
| callback | AsyncCallback\<ArrayBuffer> | Yes | Callback used to return the packed data.|
**Example**
......@@ -824,7 +825,7 @@ imagePackerApi.packing(imageSourceApi, packOpts, data => {})
### packing
packing(source: ImageSource, option: PackingOption): Promise<Array\<ArrayBuffer>>
packing(source: ImageSource, option: PackingOption): Promise\<ArrayBuffer>
Packs an image. This API uses a promise to return the result.
......@@ -841,7 +842,7 @@ Packs an image. This API uses a promise to return the result.
| Type | Description |
| :--------------------------- | :-------------------------------------------- |
| Promise<Array\<ArrayBuffer>> | Promise used to return the packed data.|
| Promise\<ArrayBuffer> | Promise used to return the packed data.|
**Example**
......@@ -852,7 +853,7 @@ imagePackerApi.packing(imageSourceApi, packOpts)
.catch(error => {})
```
### packing
### packing<sup>8+</sup>
packing(source: PixelMap, option: PackingOption, callback: AsyncCallback\<ArrayBuffer>): void
......@@ -875,9 +876,9 @@ let packOpts = { format:["image/jpeg"], quality:98 }
imagePackerApi.packing(pixelMapApi, packOpts, data => {})
```
### packing
### packing<sup>8+</sup>
packing(source: PixelMap, option: PackingOption): Promise<Array\<ArrayBuffer>>
packing(source: PixelMap, option: PackingOption): Promise\<ArrayBuffer>
Packs an image. This API uses a promise to return the result.
......@@ -894,7 +895,7 @@ Packs an image. This API uses a promise to return the result.
| Type | Description |
| :--------------------------- | :-------------------------------------------- |
| Promise<Array\<ArrayBuffer>> | Promise used to return the packed data.|
| Promise\<ArrayBuffer> | Promise used to return the packed data.|
**Example**
......@@ -957,7 +958,7 @@ Describes area information in an image.
| pixels | ArrayBuffer | Yes | No | Pixels of the image. |
| offset | number | Yes | No | Offset for data reading. |
| stride | number | Yes | No | Number of bytes from one row of pixels in memory to the next row of pixels in memory. The value of **stride** must be greater than or equal to the value of **region.size.width** multiplied by 4. |
| region | [Region](#region8) | Yes | No | Region to read or write. The width of the region to write plus the X coordinate cannot be greater than the width of the original image. The height of the region to write plus the Y coordinate cannot be greater than the height of the original image.|
| region | [Region](#region7) | Yes | No | Region to read or write. The width of the region to write plus the X coordinate cannot be greater than the width of the original image. The height of the region to write plus the Y coordinate cannot be greater than the height of the original image.|
## ImageInfo
......@@ -1013,8 +1014,8 @@ Enumerates scale modes.
| Name | Default Value| Description |
| --------------- | ------ | -------------------------------------------------- |
| CENTER_CROP | 1 | The image is scaled in such a way that it fits the dimensions of the target and centered in the target. |
| FIT_TARGET_SIZE | 2 | The image size is reduced to fit the dimensions of the target. |
| CENTER_CROP | 1 | The image is scaled in such a way that it fits the dimensions of the target and centered in the target.|
| FIT_TARGET_SIZE | 2 | The image size is reduced to fit the dimensions of the target. |
## InitializationOptions<sup>8+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册