提交 b433cc05 编写于 作者: W wusongqing

update docs against 6670+7219+7257+7350+7427+7611+7691+7676

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 00c4ac56
...@@ -347,7 +347,7 @@ After **[camera.getCameraManager](#cameragetcameramanager)** is called, a camera ...@@ -347,7 +347,7 @@ After **[camera.getCameraManager](#cameragetcameramanager)** is called, a camera
```js ```js
async function getCameraInfo("cameraId") { async function getCameraInfo("cameraId") {
var cameraManager = await camera.getCameraManager(context); var cameraManager = await camera.getCameraManager();
var cameras = await cameraManager.getCameras(); var cameras = await cameraManager.getCameras();
var cameraObj = cameras[0]; var cameraObj = cameras[0];
var cameraId = cameraObj.cameraId; var cameraId = cameraObj.cameraId;
...@@ -2103,7 +2103,7 @@ Creates a **PhotoOutput** instance. This API uses an asynchronous callback to re ...@@ -2103,7 +2103,7 @@ Creates a **PhotoOutput** instance. This API uses an asynchronous callback to re
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------------------------------------------- | ---- | ----------------------------------- | | --------- | ------------------------------------------- | ---- | ----------------------------------- |
| surfaceId | string | Yes | Surface ID received from **ImageReceiver**. | | surfaceId | string | Yes | Surface ID received from **[ImageReceiver](js-apis-image.md#imagereceiver9)**. |
| callback | AsyncCallback<[PhotoOutput](#photooutput)\> | Yes | Callback used to return the **PhotoOutput** instance.| | callback | AsyncCallback<[PhotoOutput](#photooutput)\> | Yes | Callback used to return the **PhotoOutput** instance.|
**Example** **Example**
...@@ -2130,7 +2130,7 @@ Creates a **PhotoOutput** instance. This API uses a promise to return the instan ...@@ -2130,7 +2130,7 @@ Creates a **PhotoOutput** instance. This API uses a promise to return the instan
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| --------- | ------ | ---- | --------------------------------- | | --------- | ------ | ---- | --------------------------------- |
| surfaceId | string | Yes | Surface ID received from **ImageReceiver**.| | surfaceId | string | Yes | Surface ID received from **[ImageReceiver](js-apis-image.md#imagereceiver9)**. |
**Return value** **Return value**
...@@ -2231,10 +2231,6 @@ Captures a photo with the specified capture settings. This API uses an asynchron ...@@ -2231,10 +2231,6 @@ Captures a photo with the specified capture settings. This API uses an asynchron
**Example** **Example**
```js ```js
let settings:PhotoCaptureSetting = {
quality = 1,
rotation = 0
}
photoOutput.capture(settings, (err) => { photoOutput.capture(settings, (err) => {
if (err) { if (err) {
console.error('Failed to capture the photo ${err.message}'); console.error('Failed to capture the photo ${err.message}');
...@@ -2363,7 +2359,7 @@ Listens for frame shutter events. This API uses an asynchronous callback to retu ...@@ -2363,7 +2359,7 @@ Listens for frame shutter events. This API uses an asynchronous callback to retu
**Example** **Example**
```js ```js
photoOutput.on('frameShutter', (err, frameShutterInfo) => { photoOutput.on('frameShutter', (frameShutterInfo) => {
console.log('photo capture end, captureId : ' + frameShutterInfo.captureId); console.log('photo capture end, captureId : ' + frameShutterInfo.captureId);
console.log('Timestamp for frame : ' + frameShutterInfo.timestamp); console.log('Timestamp for frame : ' + frameShutterInfo.timestamp);
}) })
...@@ -2387,7 +2383,7 @@ Listens for photo capture end events. This API uses an asynchronous callback to ...@@ -2387,7 +2383,7 @@ Listens for photo capture end events. This API uses an asynchronous callback to
**Example** **Example**
```js ```js
photoOutput.on('captureEnd', (err, captureEndInfo) => { photoOutput.on('captureEnd', (captureEndInfo) => {
console.log('photo capture end, captureId : ' + captureEndInfo.captureId); console.log('photo capture end, captureId : ' + captureEndInfo.captureId);
console.log('frameCount : ' + captureEndInfo.frameCount); console.log('frameCount : ' + captureEndInfo.frameCount);
}) })
...@@ -2411,7 +2407,7 @@ Listens for **PhotoOutput** errors. This API uses a callback to return the error ...@@ -2411,7 +2407,7 @@ Listens for **PhotoOutput** errors. This API uses a callback to return the error
**Example** **Example**
```js ```js
photoOutput.on('error', (err, photoOutputError) => { photoOutput.on('error', (photoOutputError) => {
console.log('Photo output error code: ' + photoOutputError.code); console.log('Photo output error code: ' + photoOutputError.code);
}) })
``` ```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册