Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
df29112c
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,发现更多精彩内容 >>
提交
df29112c
编写于
3月 30, 2022
作者:
Z
zengyawen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update docs
Signed-off-by:
N
zengyawen
<
zengyawen1@huawei.com
>
上级
c33588e0
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
3593 deletion
+0
-3593
en/application-dev/reference/apis/js-apis-audio.md
en/application-dev/reference/apis/js-apis-audio.md
+0
-72
en/application-dev/reference/apis/js-apis-camera.md
en/application-dev/reference/apis/js-apis-camera.md
+0
-2798
en/application-dev/reference/apis/js-apis-media.md
en/application-dev/reference/apis/js-apis-media.md
+0
-723
未找到文件。
en/application-dev/reference/apis/js-apis-audio.md
浏览文件 @
df29112c
...
...
@@ -434,18 +434,6 @@ Enumerates the interrupt types.
| INTERRUPT_TYPE_BEGIN | 1 | Audio playback interruption started. |
| INTERRUPT_TYPE_END | 2 | Audio playback interruption ended. |
## InterruptForceType<sup>9+</sup>
Enumerates the interrupt force types.
**System capability:**
SystemCapability.Multimedia.Audio.Renderer
| Name | Default Value | Description |
| :-------------- | :------------ | :----------------------------------------- |
| INTERRUPT_FORCE | 0 | Forced action taken by system. |
| INTERRUPT_SHARE | 1 | App can choose to take action or ignore. |
## InterruptHint
Enumerates the interrupt hints.
...
...
@@ -542,20 +530,6 @@ Describes audio capturer configuration options.
| streamInfo |
[
AudioStreamInfo
](
#audiostreaminfo8
)
| Yes | Stream information. |
| capturerInfo |
[
AudioCapturerInfo
](
#audiocapturerinfo8
)
| Yes | Capturer information. |
## InterruptEvent<sup>9+</sup>
Describes the interrupt event received by the app when playback is interrupted.
**System capability:**
SystemCapability.Multimedia.Audio.Renderer
**Parameters:**
| Name | Type | Mandatory | Description |
| :-------- | :-------------------------------------------- | :-------- | :---------------------------------------------------------------- |
| eventType |
[
InterruptType
](
#interrupttype
)
| Yes | Whether the interruption has started or finished. |
| forceType |
[
InterruptForceType
](
#interruptforcetype9
)
| Yes | Whether the action is taken by system or to be taken by the app. |
| hintType |
[
InterruptHint
](
#interrupthint
)
| Yes | Type of action. |
## AudioInterrupt
The parameters passed in by the audio listener event.
...
...
@@ -2560,52 +2534,6 @@ audioRenderer.getRenderRate().then((renderRate) => {
});
```
### on('interrupt')<sup>9+</sup>
on(type: 'interrupt', callback: Callback
\<
InterruptEvent>): void
Subscribes to audio interrupt events. This API uses a callback to get interrupt events. The interrupt event is triggered when audio rendering is interrupted.
**System capability:**
SystemCapability.Multimedia.Audio.Renderer
**Parameters:**
| Name | Type | Mandatory | Description |
| :------- | :-------------------------------------------- | :-------- | :---------------------------------------------- |
| type | string | Yes | Type of the playback event to subscribe to. |
| callback | Callback<
[
InterruptEvent
](
#interruptevent9
)
\>
| Yes | Callback used to listen for interrupt callback. |
**Example:**
```
audioRenderer.on('interrupt', (interruptEvent) => {
if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_FORCE) {
switch (interruptEvent.hintType) {
case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
console.log('Force paused. Stop writing');
isPlay = false;
break;
case audio.InterruptHint.INTERRUPT_HINT_STOP:
console.log('Force stopped. Stop writing');
isPlay = false;
break;
}
} else if (interruptEvent.forceType == audio.InterruptForceType.INTERRUPT_SHARE) {
switch (interruptEvent.hintType) {
case audio.InterruptHint.INTERRUPT_HINT_RESUME:
console.log('Resume force paused renderer or ignore');
startRenderer();
break;
case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
console.log('Choose to pause or ignore');
pauseRenderer();
break;
}
}
});
```
### on('markReach')<sup>8+</sup>
on(type: 'markReach', frame: number, callback: (position: number) => {}): void
...
...
en/application-dev/reference/apis/js-apis-camera.md
已删除
100644 → 0
浏览文件 @
c33588e0
此差异已折叠。
点击以展开。
en/application-dev/reference/apis/js-apis-media.md
浏览文件 @
df29112c
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录