diff --git a/zh-cn/application-dev/media/camera-device-input.md b/zh-cn/application-dev/media/camera-device-input.md index 6aa0dfc4328e3fbfb7da000627e4b9ac4bf32224..b3ceea2db9ad0456ec9c44847f5ff3ef561c2642 100644 --- a/zh-cn/application-dev/media/camera-device-input.md +++ b/zh-cn/application-dev/media/camera-device-input.md @@ -75,7 +75,7 @@ 通过注册cameraStatus事件,通过回调返回监听结果,callback返回CameraStatusInfo参数,参数的具体内容可参考相机管理器回调接口实例[CameraStatusInfo](../reference/apis/js-apis-camera.md#camerastatusinfo)。 ```ts -cameraManager.on('cameraStatus', (cameraStatusInfo) => { +cameraManager.on('cameraStatus', (err, cameraStatusInfo) => { console.info(`camera: ${cameraStatusInfo.camera.cameraId}`); console.info(`status: ${cameraStatusInfo.status}`); }) diff --git a/zh-cn/application-dev/media/camera-metadata.md b/zh-cn/application-dev/media/camera-metadata.md index c4c5f32656a403af4bb13062bfbafe77fec46489..9e681e0b819b5d93a62e8b948a46b221bf6e44f1 100644 --- a/zh-cn/application-dev/media/camera-metadata.md +++ b/zh-cn/application-dev/media/camera-metadata.md @@ -48,7 +48,7 @@ Metadata主要是通过一个TAG(Key),去找对应的Data,用于传递 - 通过注册监听获取metadata对象,监听事件固定为metadataObjectsAvailable。检测到有效metadata数据时,callback返回相应的metadata数据信息,metadataOutput创建成功时可监听。 ```ts - metadataOutput.on('metadataObjectsAvailable', (metadataObjectArr) => { + metadataOutput.on('metadataObjectsAvailable', (err, metadataObjectArr) => { console.info(`metadata output metadataObjectsAvailable`); }) ``` diff --git a/zh-cn/application-dev/media/camera-recording-case.md b/zh-cn/application-dev/media/camera-recording-case.md index ce31512966b3af7305f777f67af36c53a383944e..a1f980fd2af149a10a9fce339d8f18f28c7bba6c 100644 --- a/zh-cn/application-dev/media/camera-recording-case.md +++ b/zh-cn/application-dev/media/camera-recording-case.md @@ -22,7 +22,7 @@ if (!cameraManager) { } // 监听相机状态变化 -cameraManager.on('cameraStatus', (cameraStatusInfo) => { +cameraManager.on('cameraStatus', (err, cameraStatusInfo) => { console.log(`camera : ${cameraStatusInfo.camera.cameraId}`); console.log(`status: ${cameraStatusInfo.status}`); }) diff --git a/zh-cn/application-dev/media/camera-shooting-case.md b/zh-cn/application-dev/media/camera-shooting-case.md index aa85b7136740b20d84a955e5fccdb4301113914d..c8f307cc352937643b72e9942730bae8db0c5a87 100644 --- a/zh-cn/application-dev/media/camera-shooting-case.md +++ b/zh-cn/application-dev/media/camera-shooting-case.md @@ -21,7 +21,7 @@ if (!cameraManager) { return; } // 监听相机状态变化 -cameraManager.on('cameraStatus', (cameraStatusInfo) => { +cameraManager.on('cameraStatus', (err, cameraStatusInfo) => { console.info(`camera : ${cameraStatusInfo.camera.cameraId}`); console.info(`status: ${cameraStatusInfo.status}`); }) diff --git a/zh-cn/application-dev/media/camera-shooting.md b/zh-cn/application-dev/media/camera-shooting.md index 1b868fb8ba241472f95e2b3011dede1810bd8435..9f16f3210151e9d9e92fb64fc16a68a6c3c5d538 100644 --- a/zh-cn/application-dev/media/camera-shooting.md +++ b/zh-cn/application-dev/media/camera-shooting.md @@ -136,7 +136,7 @@ - 通过注册固定的captureStart回调函数获取监听拍照开始结果,photoOutput创建成功时即可监听,拍照第一次曝光时触发,该事件返回此次拍照的captureId。 ```ts - photoOutput.on('captureStart', (captureId) => { + photoOutput.on('captureStart', (err, captureId) => { console.info(`photo capture stated, captureId : ${captureId}`); }) ``` @@ -144,7 +144,7 @@ - 通过注册固定的captureEnd回调函数获取监听拍照结束结果,photoOutput创建成功时即可监听,该事件返回结果为拍照完全结束后的相关信息[CaptureEndInfo](../reference/apis/js-apis-camera.md#captureendinfo)。 ```ts - photoOutput.on('captureEnd', (captureEndInfo) => { + photoOutput.on('captureEnd', (err, captureEndInfo) => { console.info(`photo capture end, captureId : ${captureEndInfo.captureId}`); console.info(`frameCount : ${captureEndInfo.frameCount}`); }) diff --git a/zh-cn/application-dev/reference/apis/js-apis-camera.md b/zh-cn/application-dev/reference/apis/js-apis-camera.md index 91c398211ef607dbaad4cdead92939d23e312a12..0600df081b90a7b5682f88625ed615361e0c3c45 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-camera.md +++ b/zh-cn/application-dev/reference/apis/js-apis-camera.md @@ -576,7 +576,7 @@ on(type: 'cameraMute', callback: AsyncCallback\): void **示例:** ```js -cameraManager.on('cameraMute', (curMuetd) => { +cameraManager.on('cameraMute', (err, curMuetd) => { let isMuted = curMuetd; }) ``` @@ -2283,7 +2283,7 @@ on(type: 'focusStateChange', callback: AsyncCallback\): void **示例:** ```js -captureSession.on('focusStateChange', (focusState) => { +captureSession.on('focusStateChange', (err, focusState) => { console.log(`Focus state : ${focusState}`); }) ``` @@ -2885,7 +2885,7 @@ on(type: 'captureStart', callback: AsyncCallback\): void **示例:** ```js -photoOutput.on('captureStart', (captureId) => { +photoOutput.on('captureStart', (err, captureId) => { console.log(`photo capture stated, captureId : ${captureId}`); }) ``` @@ -2908,7 +2908,7 @@ on(type: 'frameShutter', callback: AsyncCallback\): void **示例:** ```js -photoOutput.on('frameShutter', (frameShutterInfo) => { +photoOutput.on('frameShutter', (err, frameShutterInfo) => { console.log(`photo capture end, captureId : ${frameShutterInfo.captureId}`); console.log(`Timestamp for frame : ${frameShutterInfo.timestamp}`); }) @@ -2932,7 +2932,7 @@ on(type: 'captureEnd', callback: AsyncCallback\): void **示例:** ```js -photoOutput.on('captureEnd', (captureEndInfo) => { +photoOutput.on('captureEnd', (err, captureEndInfo) => { console.log(`photo capture end, captureId : ${captureEndInfo.captureId}`); console.log(`frameCount : ${captureEndInfo.frameCount}`); }) @@ -3380,7 +3380,7 @@ on(type: 'metadataObjectsAvailable', callback: AsyncCallback\ { +metadataOutput.on('metadataObjectsAvailable', (err, metadataObjectArr) => { console.log(`metadata output metadataObjectsAvailable`); }) ```