提交 7a2d07e3 编写于 作者: L liyuhang 提交者: Li Yuhang

fixed 9f82b9ca from https://gitee.com/imyuhang/docs/pulls/16815

Fix avsession docs, audioManager->audioRoutingManager
Signed-off-by: Nliyuhang <liyuhang24@huawei.com>
Change-Id: I9fc1bbad77fc914a4e74fb219bf905b4ccd1a473
上级 f90c1c17
......@@ -348,8 +348,9 @@ castAudio(session: SessionToken | 'all', audioDevices: Array<audio.AudioDeviceDe
import audio from '@ohos.multimedia.audio';
let audioManager = audio.getAudioManager();
let audioRoutingManager = audioManager.getRoutingManager();
let audioDevices;
await audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => {
await audioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => {
audioDevices = data;
console.info('Promise returned to indicate that the device list is obtained.');
}).catch((err) => {
......@@ -400,8 +401,9 @@ castAudio(session: SessionToken | 'all', audioDevices: Array<audio.AudioDeviceDe
import audio from '@ohos.multimedia.audio';
let audioManager = audio.getAudioManager();
let audioRoutingManager = audioManager.getRoutingManager();
let audioDevices;
await audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => {
await audioRoutingManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data) => {
audioDevices = data;
console.info('Promise returned to indicate that the device list is obtained.');
}).catch((err) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册