Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
4f82bf40
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4f82bf40
编写于
12月 06, 2022
作者:
M
mali
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add text description for unknown parameters
Signed-off-by:
N
mali
<
mali81@huawei.com
>
上级
79924dc8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
28 addition
and
28 deletion
+28
-28
zh-cn/application-dev/reference/apis/js-apis-camera.md
zh-cn/application-dev/reference/apis/js-apis-camera.md
+28
-28
未找到文件。
zh-cn/application-dev/reference/apis/js-apis-camera.md
浏览文件 @
4f82bf40
...
...
@@ -171,8 +171,8 @@ getSupportedCameras(): Promise<Array<CameraDevice\>\>
**示例:**
```
js
cameraManager
.
getSupportedCameras
().
then
((
camera
Array
)
=>
{
console
.
log
(
`Promise returned with an array of supported cameras:
${
camera
Array
.
length
}
`
);
cameraManager
.
getSupportedCameras
().
then
((
camera
s
)
=>
{
console
.
log
(
`Promise returned with an array of supported cameras:
${
camera
s
.
length
}
`
);
})
```
...
...
@@ -196,7 +196,7 @@ getSupportedOutputCapability(camera:CameraDevice, callback: AsyncCallback<Camera
```
js
cameraManager
.
getSupportedOutputCapability
(
cameradevice
,
(
err
,
CameraOutputCapability
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to get the
cameras
.
${
err
.
message
}
`
);
console
.
error
(
`Failed to get the
outputCapability
.
${
err
.
message
}
`
);
return
;
}
console
.
log
(
'
Callback returned with an array of supported outputCapability
'
);
...
...
@@ -433,8 +433,8 @@ createPreviewOutput(profile: Profile, surfaceId: string, callback: AsyncCallback
| 名称 | 类型 | 必填 | 说明 |
| -------- | ----------------------------------------------- | ---- | ------------------------------- |
| profile |
[
Profile
](
#profile
)
| 是 | 支持的预览配置信息
。
|
| surfaceId| string | 是 | 从
[
XComponent
](
../arkui-ts/ts-basic-components-xcomponent.md
)
或者
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
组件获取的
SurfaceID
。|
| profile |
[
Profile
](
#profile
)
| 是 | 支持的预览配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
XComponent
](
../arkui-ts/ts-basic-components-xcomponent.md
)
或者
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
组件获取的
surfaceId
。|
| callback | AsyncCallback<
[
PreviewOutput
](
#previewoutput
)
\>
| 是 | 回调函数,用于获取PreviewOutput实例。|
**示例:**
...
...
@@ -461,8 +461,8 @@ createPreviewOutput(profile: Profile, surfaceId: string): Promise<PreviewOutput\
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------| ---- | ----------------- |
| profile |
[
Profile
](
#profile
)
| 是 | 支持的预览配置信息
。
|
| surfaceId| string | 是 | 从
[
XComponent
](
../arkui-ts/ts-basic-components-xcomponent.md
)
或者
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
组件获取的
SurfaceID
。 |
| profile |
[
Profile
](
#profile
)
| 是 | 支持的预览配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
XComponent
](
../arkui-ts/ts-basic-components-xcomponent.md
)
或者
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
组件获取的
surfaceId
。 |
**返回值:**
...
...
@@ -490,8 +490,8 @@ createPhotoOutput(profile: Profile, surfaceId: string, callback: AsyncCallback<P
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------- | ---- | ----------------------------------- |
| profile |
[
Profile
](
#profile
)
| 是 | 支持的拍照配置信息
。
|
| surfaceId| string | 是 | 从
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
获取的
SurfaceID
。|
| profile |
[
Profile
](
#profile
)
| 是 | 支持的拍照配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
获取的
surfaceId
。|
| callback | AsyncCallback<
[
PhotoOutput
](
#photooutput
)
\>
| 是 | 回调函数,用于获取PhotoOutput实例。 |
**示例:**
...
...
@@ -518,8 +518,8 @@ createPhotoOutput(profile: Profile, surfaceId: string): Promise<PhotoOutput\>
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------| ---- | ----------- |
| profile |
[
Profile
](
#profile
)
| 是 | 支持的拍照配置信息
。
|
| surfaceId| string | 是 | 从
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
获取的
SurfaceID
。|
| profile |
[
Profile
](
#profile
)
| 是 | 支持的拍照配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
ImageReceiver
](
js-apis-image.md#imagereceiver9
)
获取的
surfaceId
。|
**返回值:**
...
...
@@ -547,8 +547,8 @@ createVideoOutput(profile: VideoProfile, surfaceId: string, callback: AsyncCallb
| 名称 | 类型 | 必填 | 说明 |
| -------- | ------------------------------------------- | ---- | ------------------------------ |
| profile |
[
VideoProfile
](
#videoprofile
)
| 是 | 支持的录像配置信息
。
|
| surfaceId| string | 是 | 从
[
VideoRecorder
](
js-apis-media.md#videorecorder9
)
获取的
SurfaceID
。|
| profile |
[
VideoProfile
](
#videoprofile
)
| 是 | 支持的录像配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
VideoRecorder
](
js-apis-media.md#videorecorder9
)
获取的
surfaceId
。|
| callback | AsyncCallback<
[
VideoOutput
](
#videooutput
)
\>
| 是 | 回调函数,用于获取VideoOutput实例。 |
**示例:**
...
...
@@ -575,8 +575,8 @@ createVideoOutput(profile: VideoProfile, surfaceId: string): Promise<VideoOutput
| 名称 | 类型 | 必填 | 说明 |
| -------- | ---------------------------------| ---- | ---------- |
| profile |
[
VideoProfile
](
#videoprofile
)
| 是 | 支持的录像配置信息
。
|
| surfaceId| string | 是 | 从
[
VideoRecorder
](
js-apis-media.md#videorecorder9
)
获取的
SurfaceID
。|
| profile |
[
VideoProfile
](
#videoprofile
)
| 是 | 支持的录像配置信息
,通过getSupportedOutputCapability接口获取。
|
| surfaceId| string | 是 | 从
[
VideoRecorder
](
js-apis-media.md#videorecorder9
)
获取的
surfaceId
。|
**返回值:**
...
...
@@ -642,7 +642,7 @@ createMetadataOutput(metadataObjectTypes:Array<MetadataObjectType\>): Promise<Me
**示例:**
```
js
cameraManager
.
createMetadataOutput
().
then
((
metadataOutput
)
=>
{
cameraManager
.
createMetadataOutput
(
metadataObjectTypes
).
then
((
metadataOutput
)
=>
{
console
.
log
(
'
Promise returned with metadataOutput created.
'
);
})
```
...
...
@@ -736,12 +736,12 @@ on(type: 'cameraMute', callback: AsyncCallback<boolean\>): void
| 名称 | 类型 | 必填 | 说明 |
| -------- | --------------- | ---- | --------- |
| type | string | 是 | 监听事件,固定为'cameraMute',即禁用状态变化事件。 |
| callback |
boolean
| 是 | 回调函数,用于获取禁用状态变化信息。 |
| callback |
AsyncCallback
<boolean>
| 是 | 回调函数,用于获取禁用状态变化信息。 |
**示例:**
```
js
cameraManager
.
on
(
'
cameraMute
'
,
(
err
,
c
ameraStatusInfo
)
=>
{
cameraManager
.
on
(
'
cameraMute
'
,
(
err
,
c
urMuetd
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to get cameraMute callback.
${
err
.
message
}
`
);
return
;
...
...
@@ -2125,13 +2125,13 @@ setExposureBias(exposureBias: number, callback: AsyncCallback<void\>): void
| 名称 | 类型 | 必填 | 说明 |
| -------- | -------------------------------| ---- | ------------------- |
| exposureBias | number | 是 | 曝光补偿
。
|
| exposureBias | number | 是 | 曝光补偿
,getExposureBiasRange查询支持的范围
|
| callback | AsyncCallback<void
\>
| 是 | 回调函数,用于获取结果。 |
**示例:**
```
js
captureSession
.
setExposureBias
(
-
4
,(
err
)
=>
{
captureSession
.
setExposureBias
(
exposureBias
,(
err
)
=>
{
if
(
err
)
{
console
.
log
(
`Failed to set the exposure bias
${
err
.
message
}
`
);
return
;
...
...
@@ -2154,7 +2154,7 @@ setExposureBias(exposureBias: number): Promise<void\>
| 名称 | 类型 | 必填 | 说明 |
| -------------- | --------- | ---- | --------- |
| exposureBias | number | 是 | 曝光补偿
。
|
| exposureBias | number | 是 | 曝光补偿
,getExposureBiasRange查询支持的范围
|
**返回值:**
...
...
@@ -2165,7 +2165,7 @@ setExposureBias(exposureBias: number): Promise<void\>
**示例:**
```
js
captureSession
.
setExposureBias
(
-
4
).
then
(()
=>
{
captureSession
.
setExposureBias
(
exposureBias
).
then
(()
=>
{
console
.
log
(
'
Promise returned with the successful execution of setExposureBias.
'
);
})
```
...
...
@@ -2595,13 +2595,13 @@ setZoomRatio(zoomRatio: number, callback: AsyncCallback<void\>): void
| 名称 | 类型 | 必填 | 说明 |
| --------- | -------------------- | ---- | ------------------- |
| zoomRatio | number | 是 | 可变焦距比
。
|
| zoomRatio | number | 是 | 可变焦距比
,通过getZoomRatioRange获取支持的变焦范围
|
| callback | AsyncCallback<void
\>
| 是 | 回调函数,用于获取结果。 |
**示例:**
```
js
captureSession
.
setZoomRatio
(
1
,
(
err
)
=>
{
captureSession
.
setZoomRatio
(
zoomRatio
,
(
err
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to set the zoom ratio value
${
err
.
message
}
`
);
return
;
...
...
@@ -2622,7 +2622,7 @@ setZoomRatio(zoomRatio: number): Promise<void\>
| 名称 | 类型 | 必填 | 说明 |
| --------- | ------ | ---- | --------- |
| zoomRatio | number | 是 | 可变焦距比
。
|
| zoomRatio | number | 是 | 可变焦距比
,通过getZoomRatioRange获取支持的变焦范围
|
**返回值:**
...
...
@@ -2633,7 +2633,7 @@ setZoomRatio(zoomRatio: number): Promise<void\>
**示例:**
```
js
captureSession
.
setZoomRatio
(
1
).
then
(()
=>
{
captureSession
.
setZoomRatio
(
zoomRatio
).
then
(()
=>
{
console
.
log
(
'
Promise returned with the successful execution of setZoomRatio.
'
);
})
```
...
...
@@ -3200,7 +3200,7 @@ previewOutput.on('error', (previewOutputError) => {
## PhotoOutput
拍照会话中使用的输出信息
。
拍照会话中使用的输出信息
,继承
[
CameraOutput
](
#cameraoutput
)
### capture
...
...
@@ -3477,7 +3477,7 @@ photoOutput.on('error', (err, photoOutputError) => {
## VideoOutput
录像会话中使用的输出信息
。
录像会话中使用的输出信息
,继承
[
CameraOutput
](
#cameraoutput
)
### start
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录