Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
914a3b74
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
914a3b74
编写于
6月 20, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 20, 2023
浏览文件
操作
浏览文件
下载
差异文件
!19790 相机事件监听回调资料修改
Merge pull request !19790 from 马利/master
上级
8d00f71a
ae9d36d5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
12 deletion
+12
-12
zh-cn/application-dev/media/camera-device-input.md
zh-cn/application-dev/media/camera-device-input.md
+1
-1
zh-cn/application-dev/media/camera-metadata.md
zh-cn/application-dev/media/camera-metadata.md
+1
-1
zh-cn/application-dev/media/camera-recording-case.md
zh-cn/application-dev/media/camera-recording-case.md
+1
-1
zh-cn/application-dev/media/camera-shooting-case.md
zh-cn/application-dev/media/camera-shooting-case.md
+1
-1
zh-cn/application-dev/media/camera-shooting.md
zh-cn/application-dev/media/camera-shooting.md
+2
-2
zh-cn/application-dev/reference/apis/js-apis-camera.md
zh-cn/application-dev/reference/apis/js-apis-camera.md
+6
-6
未找到文件。
zh-cn/application-dev/media/camera-device-input.md
浏览文件 @
914a3b74
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
通过注册cameraStatus事件,通过回调返回监听结果,callback返回CameraStatusInfo参数,参数的具体内容可参考相机管理器回调接口实例
[
CameraStatusInfo
](
../reference/apis/js-apis-camera.md#camerastatusinfo
)
。
通过注册cameraStatus事件,通过回调返回监听结果,callback返回CameraStatusInfo参数,参数的具体内容可参考相机管理器回调接口实例
[
CameraStatusInfo
](
../reference/apis/js-apis-camera.md#camerastatusinfo
)
。
```
ts
```
ts
cameraManager
.
on
(
'
cameraStatus
'
,
(
cameraStatusInfo
)
=>
{
cameraManager
.
on
(
'
cameraStatus
'
,
(
err
,
cameraStatusInfo
)
=>
{
console
.
info
(
`camera:
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
info
(
`camera:
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
info
(
`status:
${
cameraStatusInfo
.
status
}
`
);
console
.
info
(
`status:
${
cameraStatusInfo
.
status
}
`
);
})
})
...
...
zh-cn/application-dev/media/camera-metadata.md
浏览文件 @
914a3b74
...
@@ -48,7 +48,7 @@ Metadata主要是通过一个TAG(Key),去找对应的Data,用于传递
...
@@ -48,7 +48,7 @@ Metadata主要是通过一个TAG(Key),去找对应的Data,用于传递
-
通过注册监听获取metadata对象,监听事件固定为metadataObjectsAvailable。检测到有效metadata数据时,callback返回相应的metadata数据信息,metadataOutput创建成功时可监听。
-
通过注册监听获取metadata对象,监听事件固定为metadataObjectsAvailable。检测到有效metadata数据时,callback返回相应的metadata数据信息,metadataOutput创建成功时可监听。
```
ts
```
ts
metadataOutput
.
on
(
'
metadataObjectsAvailable
'
,
(
metadataObjectArr
)
=>
{
metadataOutput
.
on
(
'
metadataObjectsAvailable
'
,
(
err
,
metadataObjectArr
)
=>
{
console
.
info
(
`metadata output metadataObjectsAvailable`
);
console
.
info
(
`metadata output metadataObjectsAvailable`
);
})
})
```
```
...
...
zh-cn/application-dev/media/camera-recording-case.md
浏览文件 @
914a3b74
...
@@ -22,7 +22,7 @@ if (!cameraManager) {
...
@@ -22,7 +22,7 @@ if (!cameraManager) {
}
}
// 监听相机状态变化
// 监听相机状态变化
cameraManager
.
on
(
'
cameraStatus
'
,
(
cameraStatusInfo
)
=>
{
cameraManager
.
on
(
'
cameraStatus
'
,
(
err
,
cameraStatusInfo
)
=>
{
console
.
log
(
`camera :
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
log
(
`camera :
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
log
(
`status:
${
cameraStatusInfo
.
status
}
`
);
console
.
log
(
`status:
${
cameraStatusInfo
.
status
}
`
);
})
})
...
...
zh-cn/application-dev/media/camera-shooting-case.md
浏览文件 @
914a3b74
...
@@ -21,7 +21,7 @@ if (!cameraManager) {
...
@@ -21,7 +21,7 @@ if (!cameraManager) {
return
;
return
;
}
}
// 监听相机状态变化
// 监听相机状态变化
cameraManager
.
on
(
'
cameraStatus
'
,
(
cameraStatusInfo
)
=>
{
cameraManager
.
on
(
'
cameraStatus
'
,
(
err
,
cameraStatusInfo
)
=>
{
console
.
info
(
`camera :
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
info
(
`camera :
${
cameraStatusInfo
.
camera
.
cameraId
}
`
);
console
.
info
(
`status:
${
cameraStatusInfo
.
status
}
`
);
console
.
info
(
`status:
${
cameraStatusInfo
.
status
}
`
);
})
})
...
...
zh-cn/application-dev/media/camera-shooting.md
浏览文件 @
914a3b74
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
-
通过注册固定的captureStart回调函数获取监听拍照开始结果,photoOutput创建成功时即可监听,拍照第一次曝光时触发,该事件返回此次拍照的captureId。
-
通过注册固定的captureStart回调函数获取监听拍照开始结果,photoOutput创建成功时即可监听,拍照第一次曝光时触发,该事件返回此次拍照的captureId。
```
ts
```
ts
photoOutput
.
on
(
'
captureStart
'
,
(
captureId
)
=>
{
photoOutput
.
on
(
'
captureStart
'
,
(
err
,
captureId
)
=>
{
console
.
info
(
`photo capture stated, captureId :
${
captureId
}
`
);
console
.
info
(
`photo capture stated, captureId :
${
captureId
}
`
);
})
})
```
```
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
-
通过注册固定的captureEnd回调函数获取监听拍照结束结果,photoOutput创建成功时即可监听,该事件返回结果为拍照完全结束后的相关信息
[
CaptureEndInfo
](
../reference/apis/js-apis-camera.md#captureendinfo
)
。
-
通过注册固定的captureEnd回调函数获取监听拍照结束结果,photoOutput创建成功时即可监听,该事件返回结果为拍照完全结束后的相关信息
[
CaptureEndInfo
](
../reference/apis/js-apis-camera.md#captureendinfo
)
。
```
ts
```
ts
photoOutput
.
on
(
'
captureEnd
'
,
(
captureEndInfo
)
=>
{
photoOutput
.
on
(
'
captureEnd
'
,
(
err
,
captureEndInfo
)
=>
{
console
.
info
(
`photo capture end, captureId :
${
captureEndInfo
.
captureId
}
`
);
console
.
info
(
`photo capture end, captureId :
${
captureEndInfo
.
captureId
}
`
);
console
.
info
(
`frameCount :
${
captureEndInfo
.
frameCount
}
`
);
console
.
info
(
`frameCount :
${
captureEndInfo
.
frameCount
}
`
);
})
})
...
...
zh-cn/application-dev/reference/apis/js-apis-camera.md
浏览文件 @
914a3b74
...
@@ -576,7 +576,7 @@ on(type: 'cameraMute', callback: AsyncCallback\<boolean\>): void
...
@@ -576,7 +576,7 @@ on(type: 'cameraMute', callback: AsyncCallback\<boolean\>): void
**示例:**
**示例:**
```
js
```
js
cameraManager
.
on
(
'
cameraMute
'
,
(
curMuetd
)
=>
{
cameraManager
.
on
(
'
cameraMute
'
,
(
err
,
curMuetd
)
=>
{
let
isMuted
=
curMuetd
;
let
isMuted
=
curMuetd
;
})
})
```
```
...
@@ -2283,7 +2283,7 @@ on(type: 'focusStateChange', callback: AsyncCallback\<FocusState\>): void
...
@@ -2283,7 +2283,7 @@ on(type: 'focusStateChange', callback: AsyncCallback\<FocusState\>): void
**示例:**
**示例:**
```
js
```
js
captureSession
.
on
(
'
focusStateChange
'
,
(
focusState
)
=>
{
captureSession
.
on
(
'
focusStateChange
'
,
(
err
,
focusState
)
=>
{
console
.
log
(
`Focus state :
${
focusState
}
`
);
console
.
log
(
`Focus state :
${
focusState
}
`
);
})
})
```
```
...
@@ -2885,7 +2885,7 @@ on(type: 'captureStart', callback: AsyncCallback\<number\>): void
...
@@ -2885,7 +2885,7 @@ on(type: 'captureStart', callback: AsyncCallback\<number\>): void
**示例:**
**示例:**
```
js
```
js
photoOutput
.
on
(
'
captureStart
'
,
(
captureId
)
=>
{
photoOutput
.
on
(
'
captureStart
'
,
(
err
,
captureId
)
=>
{
console
.
log
(
`photo capture stated, captureId :
${
captureId
}
`
);
console
.
log
(
`photo capture stated, captureId :
${
captureId
}
`
);
})
})
```
```
...
@@ -2908,7 +2908,7 @@ on(type: 'frameShutter', callback: AsyncCallback\<FrameShutterInfo\>): void
...
@@ -2908,7 +2908,7 @@ on(type: 'frameShutter', callback: AsyncCallback\<FrameShutterInfo\>): void
**示例:**
**示例:**
```
js
```
js
photoOutput
.
on
(
'
frameShutter
'
,
(
frameShutterInfo
)
=>
{
photoOutput
.
on
(
'
frameShutter
'
,
(
err
,
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
}
`
);
})
})
...
@@ -2932,7 +2932,7 @@ on(type: 'captureEnd', callback: AsyncCallback\<CaptureEndInfo\>): void
...
@@ -2932,7 +2932,7 @@ on(type: 'captureEnd', callback: AsyncCallback\<CaptureEndInfo\>): void
**示例:**
**示例:**
```
js
```
js
photoOutput
.
on
(
'
captureEnd
'
,
(
captureEndInfo
)
=>
{
photoOutput
.
on
(
'
captureEnd
'
,
(
err
,
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
}
`
);
})
})
...
@@ -3380,7 +3380,7 @@ on(type: 'metadataObjectsAvailable', callback: AsyncCallback\<Array\<MetadataObj
...
@@ -3380,7 +3380,7 @@ on(type: 'metadataObjectsAvailable', callback: AsyncCallback\<Array\<MetadataObj
**示例:**
**示例:**
```
js
```
js
metadataOutput
.
on
(
'
metadataObjectsAvailable
'
,
(
metadataObjectArr
)
=>
{
metadataOutput
.
on
(
'
metadataObjectsAvailable
'
,
(
err
,
metadataObjectArr
)
=>
{
console
.
log
(
`metadata output metadataObjectsAvailable`
);
console
.
log
(
`metadata output metadataObjectsAvailable`
);
})
})
```
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录