提交 a012cb46 编写于 作者: W wusongqing

correct typos

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 a4969725
......@@ -490,7 +490,7 @@ terminateSelf(callback: AsyncCallback&lt;void&gt;): void
```js
this.context.terminateSelf((err) => {
console.log('terminateSelf result:' + JSON.stringfy(err));
console.log('terminateSelf result:' + JSON.stringify(err));
});
```
......@@ -512,9 +512,9 @@ terminateSelf(): Promise&lt;void&gt;
```js
this.context.terminateSelf(want).then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......@@ -717,7 +717,7 @@ var connection = 111;
this.context.disconnectAbility(connection).then(() => {
console.log('disconnect success')
}).catch((err) => {
console.log('disconnect filed')
console.log('disconnect failed')
})
```
......@@ -740,7 +740,7 @@ setMissionLabel(label: string, callback:AsyncCallback&lt;void&gt;): void
```js
this.context.setMissionLabel("test",(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result));
console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
});
```
......@@ -769,9 +769,9 @@ setMissionLabel(label: string): Promise\<void>
```js
this.context.setMissionLabel("test").then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......@@ -794,7 +794,7 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;, requestCallback: As
```js
this.context.requestPermissionsFromUser(permissions,(result) => {
console.log('requestPermissionsFromUserresult:' + JSON.stringfy(result));
console.log('requestPermissionsFromUserresult:' + JSON.stringify(result));
});
```
......@@ -823,9 +823,9 @@ requestPermissionsFromUser(permissions: Array&lt;string&gt;) : Promise&lt;Permis
```js
this.context.requestPermissionsFromUser(permissions).then((data) => {
console.log('success:' + JSON.stringfy(data));
console.log('success:' + JSON.stringify(data));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......
......@@ -6,7 +6,7 @@
Ability运行相关信息。
# 导入模块
## 导入模块
```js
import abilitymanager from '@ohos.application.abilityManager';
......
......@@ -34,7 +34,7 @@ static isRunningInStabilityTest(callback: AsyncCallback&lt;boolean&gt;): void
```js
import app from '@ohos.application.appManager';
app.isRunningInStabilityTest((err, flag) => {
console.log('startAbility result:' + JSON.stringfy(err));
console.log('startAbility result:' + JSON.stringify(err));
})
```
......@@ -58,9 +58,9 @@ static isRunningInStabilityTest(): Promise&lt;boolean&gt;
```js
import app from '@ohos.application.appManager';
app.isRunningInStabilityTest().then((flag) => {
console.log('success:' + JSON.stringfy(flag));
console.log('success:' + JSON.stringify(flag));
}).catch((error) => {
console.log('failed:' + JSON.stringfy(error));
console.log('failed:' + JSON.stringify(error));
});
```
......
......@@ -9,7 +9,7 @@
- [AudioManager](#audiomanager):音频管理。
- [AudioRenderer](#audiorenderer8):音频渲染,用于播放PCM(Pulse Code Modulation)音频数据。
- [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM(Pulse Code Modulation)音频数据。
- [AudioCapturer](#audiocapturer8):音频采集,用于录制PCM音频数据。
## 导入模块
......@@ -40,7 +40,7 @@ var audioManager = audio.getAudioManager();
createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback\<AudioRenderer>): void
获取音频渲染器。
获取音频渲染器。使用callback方式异步返回结果。
**系统能力:** SystemCapability.Multimedia.Audio.Renderer
......@@ -102,7 +102,7 @@ createAudioRenderer(options: AudioRendererOptions): Promise<AudioRenderer\>
| 类型 | 说明 |
| ----------------------------------------- | ---------------- |
| Promise<[AudioRenderer](#audiorenderer8)> | 音频播放器对象。 |
| Promise<[AudioRenderer](#audiorenderer8)> | 音频渲染器对象。 |
**示例:**
......@@ -226,7 +226,7 @@ var audioCapturerOptions = {
}
var audioCapturer;
audio.createAudioRenderer(audioCapturerOptions).then((data) => {
audio.createAudioCapturer(audioCapturerOptions).then((data) => {
audioCapturer = data;
console.info('AudioCapturer Created : Success : Stream Type: SUCCESS');
}).catch((err) => {
......@@ -1802,7 +1802,7 @@ audioManager.getAudioScene().then((value) => {
**系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.Audio.Device
| 名称 | 参数型 | 可读 | 可写 | 说明 |
| 名称 | 型 | 可读 | 可写 | 说明 |
| ---------- | ------------------------- | ---- | ---- | ---------- |
| deviceRole | [DeviceRole](#devicerole) | 是 | 否 | 设备角色。 |
| deviceType | [DeviceType](#devicetype) | 是 | 否 | 设备类型。 |
......@@ -1845,7 +1845,7 @@ promise.then(function (value) {
**系统能力:** SystemCapability.Multimedia.Audio.Renderer
| 名称 | 参数型 | 可读 | 可写 | 说明 |
| 名称 | 型 | 可读 | 可写 | 说明 |
| ----- | -------------------------- | ---- | ---- | ------------------ |
| state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频渲染器的状态。 |
......@@ -2654,7 +2654,7 @@ audioRenderer.on('stateChange', (state) => {
**系统能力:** SystemCapability.Multimedia.Audio.Capturer
| 名称 | 参数型 | 可读 | 可写 | 说明 |
| 名称 | 型 | 可读 | 可写 | 说明 |
| :---- | :------------------------- | :--- | :--- | :--------------- |
| state<sup>8+</sup> | [AudioState](#audiostate8) | 是 | 否 | 音频采集器状态。 |
......
......@@ -1016,7 +1016,7 @@ on(type: 'error', callback: ErrorCallback<CameraInputError\>): void
| 名称 | 类型 | 必填 | 说明 |
| :------- | :------------------------------- | :--- | :---------------------------------------------- |
| type | string | 是 | 监听事件,固定为'error',即CamerInput错误事件。 |
| type | string | 是 | 监听事件,固定为'error',即CameraInput错误事件。 |
| callback | ErrorCallback<CameraInputError\> | 是 | 回调函数,用于获取结果。 |
**示例:**
......@@ -1363,7 +1363,7 @@ captureSession.addOutput(photoOutput, (err) => {
addOutput\(photoOutput: PhotoOutput\): Promise<void\>
在当前会话中,添加一个PreviewOutput实例,通过Promise获取结果。
在当前会话中,添加一个PhotoOutput实例,通过Promise获取结果。
**系统能力:** SystemCapability.Multimedia.Camera.Core
......
......@@ -578,7 +578,7 @@ let fdPath = 'fd://'
let path = '/data/accounts/account_0/appdata/ohos.xxx.xxx.xxx/01.mp3';
fileIO.open(path).then(fdNumber) => {
fdPath = fdPath + '' + fdNumber;
console.info('open fd sucess fd is' + fdPath);
console.info('open fd success fd is' + fdPath);
}, (err) => {
console.info('open fd failed err is' + err);
}).catch((err) => {
......
......@@ -215,7 +215,7 @@ set(key: string, value: string): Promise&lt;void&gt;
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| key | string | 是 | 待设置的系统属性Key。 |
| key | string | 是 | 待设置的系统属性Key。 |
| value| string | 否 | 待设置的系统属性值。 |
**返回值:**
......
......@@ -60,7 +60,7 @@ toString(): string
**系统能力:** SystemCapability.Utils.Lang
返回适用于URL中的查询字符串。
返回适用于URI中的查询字符串。
**返回值:**
......@@ -71,8 +71,8 @@ toString(): string
**示例:**
```js
const url = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da');
url.toString()
const uri = new uri.URI('http://username:password@host:8080/directory/file?query=pppppp#qwer=da');
uri.toString()
```
......
......@@ -997,7 +997,7 @@ getOperationType(agent: WantAgent): Promise\<number>
| 类型 | 说明 |
| ----------------------------------------------------------- | ------------------------------------------------------------ |
| Promise\<number\> | 以Promise形式返回获取optionType的结果。 |
| Promise\<number> | 以Promise形式返回获取operationType的结果。 |
**示例**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册