提交 f5d82986 编写于 作者: W wangzx0705

modify some code example

Signed-off-by: Nwangzx0705 <wangzx0705@thundersoft.com>
上级 4d029b0c
...@@ -3066,7 +3066,7 @@ adjustVolumeByStep(adjustType: VolumeAdjustType): Promise&lt;void&gt; ...@@ -3066,7 +3066,7 @@ adjustVolumeByStep(adjustType: VolumeAdjustType): Promise&lt;void&gt;
**示例:** **示例:**
```js ```js
audioVolumeGroupManager.adjustVolumeByStep(audio.VolumeAdjustType.VOLUME_UP).then(() => { audioVolumeGroupManager.adjustVolumeByStep(audio.VolumeAdjustType.VOLUME_UP).then((value) => {
console.info('Success to adjust the volume by step.'); console.info('Success to adjust the volume by step.');
}).catch((error) => { }).catch((error) => {
console.info('Fail to adjust the volume by step.'); console.info('Fail to adjust the volume by step.');
...@@ -3136,7 +3136,7 @@ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustTy ...@@ -3136,7 +3136,7 @@ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustTy
**示例:** **示例:**
```js ```js
audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType.MEDIA, audio.VolumeAdjustType.VOLUME_UP).then(() => { audioVolumeGroupManager.adjustSystemVolumeByStep(audio.AudioVolumeType.MEDIA, audio.VolumeAdjustType.VOLUME_UP).then((value) => {
console.info('Success to adjust the system volume by step.'); console.info('Success to adjust the system volume by step.');
}).catch((error) => { }).catch((error) => {
console.info('Fail to adjust the system volume by step.'); console.info('Fail to adjust the system volume by step.');
...@@ -3200,8 +3200,8 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De ...@@ -3200,8 +3200,8 @@ getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: De
**示例:** **示例:**
```js ```js
audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, 3, audio.DeviceType.SPEAKER).then((dB) => { audioVolumeGroupManager.getSystemVolumeInDb(audio.AudioVolumeType.MEDIA, 3, audio.DeviceType.SPEAKER).then((value) => {
console.info(`Success to get the volume DB. ${dB}`); console.info(`Success to get the volume DB. ${value}`);
}).catch((error) => { }).catch((error) => {
console.info(`Fail to adjust the system volume by step. ${error}`); console.info(`Fail to adjust the system volume by step. ${error}`);
}); });
...@@ -5520,8 +5520,8 @@ getMinStreamVolume(): Promise&lt;number&gt; ...@@ -5520,8 +5520,8 @@ getMinStreamVolume(): Promise&lt;number&gt;
**示例:** **示例:**
```js ```js
audioRenderer.getMinStreamVolume().then(minVolume => { audioRenderer.getMinStreamVolume().then(value => {
console.info(`Get min stream volume Success! ${minVolume}`); console.info(`Get min stream volume Success! ${value}`);
}).catch((err) => { }).catch((err) => {
console.error(`Get min stream volume Fail: ${err}`); console.error(`Get min stream volume Fail: ${err}`);
}); });
...@@ -5569,8 +5569,8 @@ getMaxStreamVolume(): Promise&lt;number&gt; ...@@ -5569,8 +5569,8 @@ getMaxStreamVolume(): Promise&lt;number&gt;
**示例:** **示例:**
```js ```js
audioRenderer.getMaxStreamVolume().then(maxVolume => { audioRenderer.getMaxStreamVolume().then(value => {
console.info(`Get max stream volume Success! ${maxVolume}`); console.info(`Get max stream volume Success! ${value}`);
}).catch((err) => { }).catch((err) => {
console.error(`Get max stream volume Fail: ${err}`); console.error(`Get max stream volume Fail: ${err}`);
}); });
...@@ -5618,8 +5618,8 @@ getUnderflowCount(): Promise&lt;number&gt; ...@@ -5618,8 +5618,8 @@ getUnderflowCount(): Promise&lt;number&gt;
**示例:** **示例:**
```js ```js
audioRenderer.getUnderflowCount().then(underflowCount => { audioRenderer.getUnderflowCount().then(value => {
console.info(`Get underflow count Success! ${underflowCount}`); console.info(`Get underflow count Success! ${value}`);
}).catch((err) => { }).catch((err) => {
console.error(`Get underflow count Fail: ${err}`); console.error(`Get underflow count Fail: ${err}`);
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册