Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
da493350
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看板
未验证
提交
da493350
编写于
8月 09, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
!7878 翻译回稿:6670+7219+7257+7350+7427+7611+7691+7676 媒体文档优化
Merge pull request !7878 from wusongqing/TR6670
上级
52b589cb
b433cc05
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
1071 addition
and
565 deletion
+1071
-565
en/application-dev/reference/apis/js-apis-audio.md
en/application-dev/reference/apis/js-apis-audio.md
+1065
-555
en/application-dev/reference/apis/js-apis-camera.md
en/application-dev/reference/apis/js-apis-camera.md
+6
-10
未找到文件。
en/application-dev/reference/apis/js-apis-audio.md
浏览文件 @
da493350
此差异已折叠。
点击以展开。
en/application-dev/reference/apis/js-apis-camera.md
浏览文件 @
da493350
...
...
@@ -347,7 +347,7 @@ After **[camera.getCameraManager](#cameragetcameramanager)** is called, a camera
```
js
async
function
getCameraInfo
(
"
cameraId
"
)
{
var
cameraManager
=
await
camera
.
getCameraManager
(
context
);
var
cameraManager
=
await
camera
.
getCameraManager
();
var
cameras
=
await
cameraManager
.
getCameras
();
var
cameraObj
=
cameras
[
0
];
var
cameraId
=
cameraObj
.
cameraId
;
...
...
@@ -2103,7 +2103,7 @@ Creates a **PhotoOutput** instance. This API uses an asynchronous callback to re
| 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.|
**Example**
...
...
@@ -2130,7 +2130,7 @@ Creates a **PhotoOutput** instance. This API uses a promise to return the instan
| 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**
...
...
@@ -2231,10 +2231,6 @@ Captures a photo with the specified capture settings. This API uses an asynchron
**Example**
```
js
let
settings
:
PhotoCaptureSetting
=
{
quality
=
1
,
rotation
=
0
}
photoOutput
.
capture
(
settings
,
(
err
)
=>
{
if
(
err
)
{
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
**Example**
```
js
photoOutput
.
on
(
'
frameShutter
'
,
(
err
,
frameShutterInfo
)
=>
{
photoOutput
.
on
(
'
frameShutter
'
,
(
frameShutterInfo
)
=>
{
console
.
log
(
'
photo capture end, captureId :
'
+
frameShutterInfo
.
captureId
);
console
.
log
(
'
Timestamp for frame :
'
+
frameShutterInfo
.
timestamp
);
})
...
...
@@ -2387,7 +2383,7 @@ Listens for photo capture end events. This API uses an asynchronous callback to
**Example**
```
js
photoOutput
.
on
(
'
captureEnd
'
,
(
err
,
captureEndInfo
)
=>
{
photoOutput
.
on
(
'
captureEnd
'
,
(
captureEndInfo
)
=>
{
console
.
log
(
'
photo capture end, captureId :
'
+
captureEndInfo
.
captureId
);
console
.
log
(
'
frameCount :
'
+
captureEndInfo
.
frameCount
);
})
...
...
@@ -2411,7 +2407,7 @@ Listens for **PhotoOutput** errors. This API uses a callback to return the error
**Example**
```
js
photoOutput
.
on
(
'
error
'
,
(
err
,
photoOutputError
)
=>
{
photoOutput
.
on
(
'
error
'
,
(
photoOutputError
)
=>
{
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录