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

!18925 翻译完成:18186+18662+18608+18485+18023+18309 3个媒体文档修改

Merge pull request !18925 from wusongqing/TR18186
......@@ -550,7 +550,7 @@ Listens for camera status changes. This API uses an asynchronous callback to ret
**Example**
```js
cameraManager.on('cameraStatus', (cameraStatusInfo) => {
cameraManager.on('cameraStatus', (err, cameraStatusInfo) => {
console.log(`camera : ${cameraStatusInfo.camera.cameraId}`);
console.log(`status: ${cameraStatusInfo.status}`);
})
......@@ -1679,7 +1679,7 @@ The coordinate system is based on the horizontal device direction with the devic
| Name | Type | Mandatory| Description |
| ------------- | -------------------------------| ---- | ------------------- |
| exposurePoint | [Point](#point) | Yes | Exposure point. |
| exposurePoint | [Point](#point) | Yes | Metering point. The value range of x and y must be within [0,1]. If a value less than 0 is passed, the value **0** is used. If a value greater than **1** is passed, the value **1** is used. |
**Return value**
......@@ -1754,7 +1754,7 @@ Before the setting, you are advised to use **[getExposureBiasRange](#getexposure
| Name | Type | Mandatory| Description |
| -------- | -------------------------------| ---- | ------------------- |
| exposureBias | number | Yes | Exposure bias to set, which must be within the range obtained by running **getExposureBiasRange** interface. If the API call fails, an error code defined in [CameraErrorCode](#cameraerrorcode) is returned.|
| exposureBias | number | Yes | EV. The supported EV range can be obtained by calling **getExposureBiasRange**. If calling the API fails, an error code defined in [CameraErrorCode](#cameraerrorcode) will be returned. If the value passed is not within the supported range, the nearest critical point is used.|
**Error codes**
......@@ -1936,7 +1936,7 @@ The coordinate system is based on the horizontal device direction with the devic
| Name | Type | Mandatory| Description |
| -------- | ----------------------- | ---- | ------------------- |
| Point1 | [Point](#point) | Yes | Focal point. |
| Point1 | [Point](#point) | Yes | Focal point. The value range of x and y must be within [0,1]. If a value less than 0 is passed, the value **0** is used. If a value greater than **1** is passed, the value **1** is used. |
**Return value**
......@@ -2075,7 +2075,7 @@ Sets a zoom ratio, with a maximum precision of two decimal places.
| Name | Type | Mandatory| Description |
| --------- | -------------------- | ---- | ------------------- |
| zoomRatio | number | Yes | Zoom ratio. You can use **getZoomRatioRange** to obtain the supported values.|
| zoomRatio | number | Yes | Zoom ratio. The supported zoom ratio range can be obtained by calling **getZoomRatioRange**. If the value passed is not within the supported range, the nearest critical point is used.|
**Return value**
......@@ -2735,7 +2735,7 @@ Captures a photo with the specified shooting parameters. This API uses a promise
| Name | Type | Mandatory| Description |
| ------- | ------------------------------------------- | ---- | -------- |
| setting | [PhotoCaptureSetting](#photocapturesetting) | No | Shooting settings.|
| setting | [PhotoCaptureSetting](#photocapturesetting) | No | Shooting parameters. The input of **undefined** is processed as if no parameters were passed.|
**Return value**
......
......@@ -879,6 +879,53 @@ async function Demo() {
}
```
### getColorSpace<sup>10+</sup>
getColorSpace(): colorSpaceManager.ColorSpaceManager
Obtains the color space of this image
**System capability**: SystemCapability.Multimedia.Image.Core
**Return value**
| Type | Description |
| ----------------------------------- | ---------------- |
| [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | Color space obtained.|
**Example**
```js
import colorSpaceManager from '@ohos.graphics.colorSpaceManager';
async function Demo() {
let csm = pixelmap.getColorSpace();
}
```
### setColorSpace<sup>10+</sup>
setColorSpace(colorSpace: colorSpaceManager.ColorSpaceManager): void
Sets the color space for this image.
**System capability**: SystemCapability.Multimedia.Image.Core
**Parameters**
| Name | Type | Mandatory| Description |
| ---------- | ----------------------------------- | ---- | --------------- |
| colorSpace | [colorSpaceManager.ColorSpaceManager](js-apis-colorSpaceManager.md#colorspacemanager) | Yes | Color space to set.|
**Example**
```js
import colorSpaceManager from '@ohos.graphics.colorSpaceManager';
async function Demo() {
var csm = colorSpaceManager.create(colorSpaceName);
pixelmap.setColorSpace(csm);
}
```
### release<sup>7+</sup>
release():Promise\<void>
......@@ -937,7 +984,7 @@ Creates an **ImageSource** instance based on the URI.
| Name| Type | Mandatory| Description |
| ------ | ------ | ---- | ---------------------------------- |
| uri | string | Yes | Image path. Currently, only the application sandbox path is supported.<br>Currently, the following formats are supported: JPG, PNG, GIF, BMP, Webp, and RAW.|
| uri | string | Yes | Image path. Currently, only the application sandbox path is supported.<br>Currently, the following formats are supported: .jpg, .png, .gif, .bmp, .webp, and raw. For details, see [SVG Tags<sup>10+</sup>](#svg-tags). |
**Return value**
......@@ -975,7 +1022,7 @@ Creates an **ImageSource** instance based on the URI.
| Name | Type | Mandatory| Description |
| ------- | ------------------------------- | ---- | ----------------------------------- |
| uri | string | Yes | Image path. Currently, only the application sandbox path is supported.<br>Currently, the following formats are supported: JPG, PNG, GIF, BMP, Webp, and RAW.|
| uri | string | Yes | Image path. Currently, only the application sandbox path is supported.<br>Currently, the following formats are supported: .jpg, .png, .gif, .bmp, .webp, and raw. For details, see [SVG Tags<sup>10+</sup>](#svg-tags). |
| options | [SourceOptions](#sourceoptions9) | Yes | Image properties, including the image index and default property value.|
**Return value**
......@@ -1553,10 +1600,10 @@ let decodeOpts = {
editable: true,
desiredSize: { width: 198, height: 202 },
rotate: 0,
desiredPixelFormat: RGBA_8888,
desiredPixelFormat: 3,
index: 0,
};
let pixelmaplist = await imageSourceApi.createPixelMapList(decodeOpts);
let pixelmaplist = imageSourceApi.createPixelMapList(decodeOpts);
```
### createPixelMapList<sup>10+</sup>
......@@ -1604,7 +1651,7 @@ let decodeOpts = {
editable: true,
desiredSize: { width: 198, height: 202 },
rotate: 0,
desiredPixelFormat: RGBA_8888,
desiredPixelFormat: 3,
index: 0,
};
imageSourceApi.createPixelMap(decodeOpts, pixelmaplist => {
......@@ -1651,12 +1698,12 @@ Obtains an array of delay times. This API uses a promise to return the result.
**Example**
```js
let delayTimes = await imageSourceApi.getDelayTime();
let delayTimes = imageSourceApi.getDelayTime();
```
### getFrameCount<sup>10+</sup>
getFrameCount(callback: AsyncCallback<number>): void;
getFrameCount(callback: AsyncCallback\<number>): void;
Obtains the number of frames. This API uses an asynchronous callback to return the result.
......@@ -1693,7 +1740,7 @@ Obtains the number of frames. This API uses a promise to return the result.
**Example**
```js
let frameCount = await imageSourceApi.getFrameCount();
let frameCount = imageSourceApi.getFrameCount();
```
### release
......@@ -2787,7 +2834,50 @@ Describes the color components of an image.
| pixelStride | number | Yes | No | Pixel stride. |
| byteBuffer | ArrayBuffer | Yes | No | Component buffer.|
## ResponseCode
## Supplementary Information
### SVG Tags
The SVG tags are supported since API verison 10. The used version is (SVG) 1.1. Currently, the following tags are supported:
- a
- circla
- clipPath
- defs
- ellipse
- feBlend
- feColorMatrix
- feComposite
- feDiffuseLighting
- feDisplacementMap
- feDistantLight
- feFlood
- feGaussianBlur
- feImage
- feMorphology
- feOffset
- fePointLight
- feSpecularLighting
- feSpotLight
- feTurbulence
- filter
- g
- image
- line
- linearGradient
- mask
- path
- pattern
- polygon
- polyline
- radialGradient
- rect
- stop
- svg
- text
- textPath
- tspan
- use
### ResponseCode
Enumerates the response codes returned upon build errors.
......
# Media Error Codes
# Media Error Codes
> **NOTE**
>
......@@ -27,7 +27,7 @@ Destroy this instance and re-create it. If the re-creation fails, stop related o
**Error Message**
Operate not permit.
Operation not allowed.
**Description**
......@@ -45,7 +45,7 @@ Switch the instance to the correct state and perform the operation.
**Error Message**
IO error.
I/O error.
**Description**
......@@ -63,7 +63,7 @@ Ensure that the network is normal, destroy this instance, and re-create it. If t
**Error Message**
Time out.
Operation timeout.
**Description**
......@@ -71,7 +71,7 @@ The operation timed out.
**Possible Causes**
1. The network connection times out.
1. The network connection times out. (The default network timeout period is 15 seconds, and the timer starts after the buffered event is reported.)
2. Accessing other modules times out.
**Solution**
......
......@@ -948,34 +948,33 @@
- [Multi-Language Capability](reference/js-service-widget-ui/js-service-widget-multiple-languages.md)
- [Version Compatibility Adaptation](reference/js-service-widget-ui/js-service-widget-version-compatibility.md)
- [Theme Configuration](reference/js-service-widget-ui/js-service-widget-theme.md)
- Components
- Universal
- [Universal Attributes](reference/js-service-widget-ui/js-service-widget-common-attributes.md)
- [Universal Styles](reference/js-service-widget-ui/js-service-widget-common-styles.md)
- [Universal Events](reference/js-service-widget-ui/js-service-widget-common-events.md)
- [Gradient Styles](reference/js-service-widget-ui/js-service-widget-common-gradient.md)
- [Media Query](reference/js-service-widget-ui/js-service-widget-common-mediaquery.md)
- [Custom Font Styles](reference/js-service-widget-ui/js-service-widget-common-customizing-font.md)
- [Accessibility](reference/js-service-widget-ui/js-service-widget-common-accessibility.md)
- [Atomic Layout](reference/js-service-widget-ui/js-service-widget-common-atomic-layout.md)
- Container Components
- [badge](reference/js-service-widget-ui/js-service-widget-container-badge.md)
- [div](reference/js-service-widget-ui/js-service-widget-container-div.md)
- [list](reference/js-service-widget-ui/js-service-widget-container-list.md)
- [list-item](reference/js-service-widget-ui/js-service-widget-container-list-item.md)
- [stack](reference/js-service-widget-ui/js-service-widget-container-stack.md)
- [swiper](reference/js-service-widget-ui/js-service-widget-container-swiper.md)
- Basic Components
- [button](reference/js-service-widget-ui/js-service-widget-basic-button.md)
- [calendar](reference/js-service-widget-ui/js-service-widget-basic-calendar.md)
- [chart](reference/js-service-widget-ui/js-service-widget-basic-chart.md)
- [clock](reference/js-service-widget-ui/js-service-widget-basic-clock.md)
- [divider](reference/js-service-widget-ui/js-service-widget-basic-divider.md)
- [image](reference/js-service-widget-ui/js-service-widget-basic-image.md)
- [input](reference/js-service-widget-ui/js-service-widget-basic-input.md)
- [progress](reference/js-service-widget-ui/js-service-widget-basic-progress.md)
- [span](reference/js-service-widget-ui/js-service-widget-basic-span.md)
- [text](reference/js-service-widget-ui/js-service-widget-basic-text.md)
- Universal Components
- [Universal Attributes](reference/js-service-widget-ui/js-service-widget-common-attributes.md)
- [Universal Styles](reference/js-service-widget-ui/js-service-widget-common-styles.md)
- [Universal Events](reference/js-service-widget-ui/js-service-widget-common-events.md)
- [Gradient Styles](reference/js-service-widget-ui/js-service-widget-common-gradient.md)
- [Media Query](reference/js-service-widget-ui/js-service-widget-common-mediaquery.md)
- [Custom Font Styles](reference/js-service-widget-ui/js-service-widget-common-customizing-font.md)
- [Accessibility](reference/js-service-widget-ui/js-service-widget-common-accessibility.md)
- [Atomic Layout](reference/js-service-widget-ui/js-service-widget-common-atomic-layout.md)
- Container Components
- [badge](reference/js-service-widget-ui/js-service-widget-container-badge.md)
- [div](reference/js-service-widget-ui/js-service-widget-container-div.md)
- [list](reference/js-service-widget-ui/js-service-widget-container-list.md)
- [list-item](reference/js-service-widget-ui/js-service-widget-container-list-item.md)
- [stack](reference/js-service-widget-ui/js-service-widget-container-stack.md)
- [swiper](reference/js-service-widget-ui/js-service-widget-container-swiper.md)
- Basic Components
- [button](reference/js-service-widget-ui/js-service-widget-basic-button.md)
- [calendar](reference/js-service-widget-ui/js-service-widget-basic-calendar.md)
- [chart](reference/js-service-widget-ui/js-service-widget-basic-chart.md)
- [clock](reference/js-service-widget-ui/js-service-widget-basic-clock.md)
- [divider](reference/js-service-widget-ui/js-service-widget-basic-divider.md)
- [image](reference/js-service-widget-ui/js-service-widget-basic-image.md)
- [input](reference/js-service-widget-ui/js-service-widget-basic-input.md)
- [progress](reference/js-service-widget-ui/js-service-widget-basic-progress.md)
- [span](reference/js-service-widget-ui/js-service-widget-basic-span.md)
- [text](reference/js-service-widget-ui/js-service-widget-basic-text.md)
- [Custom Component Basic Usage](reference/js-service-widget-ui/js-service-widget-custom-basic-usage.md)
- [Data Types](reference/js-service-widget-ui/js-service-widget-appendix-types.md)
- JS and TS APIs
......@@ -1097,6 +1096,7 @@
- [@ohos.events.emitter (Emitter)](reference/apis/js-apis-emitter.md)
- [@ohos.notificationManager (NotificationManager) (Recommended)](reference/apis/js-apis-notificationManager.md)
- [@ohos.notificationSubscribe (NotificationSubscribe) (Recommended)](reference/apis/js-apis-notificationSubscribe.md)
- [@ohos.application.StaticSubscriberExtensionContext (NotificationSubscribe) (Recommended)](reference/apis/js-apis-application-StaticSubscriberExtensionContext.md)
- [System Common Events (To Be Deprecated Soon)](reference/apis/commonEvent-definitions.md)
- [@ohos.commonEvent (Common Event) (To Be Deprecated Soon)](reference/apis/js-apis-commonEvent.md)
- [@ohos.notification (Notification) (To Be Deprecated Soon)](reference/apis/js-apis-notification.md)
......@@ -1114,6 +1114,10 @@
- [NotificationFlags](reference/apis/js-apis-inner-notification-notificationFlags.md)
- [NotificationRequest](reference/apis/js-apis-inner-notification-notificationRequest.md)
- [NotificationSlot](reference/apis/js-apis-inner-notification-notificationSlot.md)
- [NotificationSorting](reference/apis/js-apis-inner-notification-notificationSorting.md)
- [NotificationSortingMap](reference/apis/js-apis-inner-notification-notificationSortingMap.md)
- [NotificationSubscribeInfo](reference/apis/js-apis-inner-notification-notificationSubscribeInfo.md)
- [NotificationSubscriber](reference/apis/js-apis-inner-notification-notificationSubscriber.md)
- [NotificationTemplate](reference/apis/js-apis-inner-notification-notificationTemplate.md)
- [NotificationUserInput](reference/apis/js-apis-inner-notification-notificationUserInput.md)
- Common Events
......@@ -1227,7 +1231,7 @@
- [@ohos.file.storageStatistics (Application Storage Statistics)](reference/apis/js-apis-file-storage-statistics.md)
- [@ohos.file.volumeManager (Volume Management)](reference/apis/js-apis-file-volumemanager.md)
- [@ohos.filemanagement.userFileManager (User Data Management)](reference/apis/js-apis-userFileManager.md)
- [@ohos.fileShare (File Sharing)](reference/apis/js-apis-fileShare.md)
- [@ohos.fileshare (File Sharing)](reference/apis/js-apis-fileShare.md)
- Telephony Service
- [@ohos.contact (Contacts)](reference/apis/js-apis-contact.md)
- [@ohos.telephony.call (Call)](reference/apis/js-apis-call.md)
......@@ -1294,6 +1298,7 @@
- [@ohos.batteryStatistics (Battery Statistics)](reference/apis/js-apis-batteryStatistics.md)
- [@ohos.brightness (Screen Brightness)](reference/apis/js-apis-brightness.md)
- [@ohos.charger (Charging Type)](reference/apis/js-apis-charger.md)
- [@ohos.cooperate (Screen Hopping)](reference/apis/js-apis-devicestatus-cooperate.md)
- [@ohos.deviceInfo (Device Information)](reference/apis/js-apis-device-info.md)
- [@ohos.distributedHardware.deviceManager (Device Management)](reference/apis/js-apis-device-manager.md)
- [@ohos.geoLocationManager (Geolocation Manager)](reference/apis/js-apis-geoLocationManager.md)
......@@ -1501,6 +1506,7 @@
- [Thermal Manager Error Codes](reference/errorcodes/errorcode-thermal.md)
- [Device Management Error Codes](reference/errorcodes/errorcode-device-manager.md)
- [Location Subsystem Error Codes](reference/errorcodes/errorcode-geoLocationManager.md)
- [Screen Hopping Error Codes](reference/errorcodes/errorcode-devicestatus.md)
- [Screen Hopping Error Codes](reference/errorcodes/errorcode-multimodalinput.md)
- [Sensor Error Codes](reference/errorcodes/errorcode-sensor.md)
- [Vibrator Error Codes](reference/errorcodes/errorcode-vibrator.md)
......@@ -1605,16 +1611,16 @@
- [OH_Huks_ParamSet](reference/native-apis/_o_h___huks___param_set.md)
- [OH_Huks_PubKeyInfo](reference/native-apis/_o_h___huks___pub_key_info.md)
- [OH_Huks_Result](reference/native-apis/_o_h___huks___result.md)
- Standard Libraries Supported by Native APIs
- [Node_API](reference/native-lib/third_party_napi/napi.md)
- [libuv](reference/native-lib/third_party_libuv/libuv.md)
- [Native Standard Libraries Supported by Openharmony](reference/native-lib/third_party_libc/musl.md)
- Appendix
- [Native API Symbols Not Exported](reference/native-lib/third_party_libc/musl-peculiar-symbol.md)
- [Native API Symbols That May Fail to Be Invoked Due to Permission Control](reference/native-lib/third_party_libc/musl-permission-control-symbol.md)
- [EGL Symbols Exported from Native APIs](reference/native-lib/third_party_opengl/egl-symbol.md)
- [OpenGL ES 3.0 Symbols Exported from Native APIs](reference/native-lib/third_party_opengl/openglesv3-symbol.md)
- [OpenSL ES Interfaces Supported by Native APIs](reference/native-lib/third_party_opensles/opensles.md)
- Standard Libraries Supported by Native APIs
- [Node_API](reference/native-lib/third_party_napi/napi.md)
- [libuv](reference/native-lib/third_party_libuv/libuv.md)
- [Native Standard Libraries Supported by Openharmony](reference/native-lib/third_party_libc/musl.md)
- Appendix
- [Native API Symbols Not Exported](reference/native-lib/third_party_libc/musl-peculiar-symbol.md)
- [Native API Symbols That May Fail to Be Invoked Due to Permission Control](reference/native-lib/third_party_libc/musl-permission-control-symbol.md)
- [EGL Symbols Exported from Native APIs](reference/native-lib/third_party_opengl/egl-symbol.md)
- [OpenGL ES 3.0 Symbols Exported from Native APIs](reference/native-lib/third_party_opengl/openglesv3-symbol.md)
- [OpenSL ES Interfaces Supported by Native APIs](reference/native-lib/third_party_opensles/opensles.md)
- FAQs
- [Full SDK Compilation Guide](faqs/full-sdk-compile-guide.md)
- [Guide to Switching to Full SDK](faqs/full-sdk-switch-guide.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册