Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8879d41c
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8879d41c
编写于
11月 01, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 01, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6271 【媒体子系统】audio新增接口覆盖
Merge pull request !6271 from liuxueqi/monthly_20221018
上级
57c023e3
7e0e1c53
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1055 addition
and
390 deletion
+1055
-390
multimedia/audio/audio_js_standard/AudioCapturerChangeInfo/src/main/js/test/AudioCapturerChangeInfo.test.js
...angeInfo/src/main/js/test/AudioCapturerChangeInfo.test.js
+2
-16
multimedia/audio/audio_js_standard/AudioRendererChangeInfo/src/main/js/test/AudioRendererChangeInfo.test.js
...angeInfo/src/main/js/test/AudioRendererChangeInfo.test.js
+2
-16
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
...dard/audioManager/src/main/js/test/AudioFramework.test.js
+0
-357
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js
...rd/audioManager/src/main/js/test/AudioManagerApi9.test.js
+1050
-0
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/List.test.js
...io_js_standard/audioManager/src/main/js/test/List.test.js
+1
-1
未找到文件。
multimedia/audio/audio_js_standard/AudioCapturerChangeInfo/src/main/js/test/AudioCapturerChangeInfo.test.js
浏览文件 @
8879d41c
...
...
@@ -35,22 +35,8 @@ describe('audioCapturerChange', function () {
await
sleep
(
100
);
console
.
info
(
`AudioFrameworkTest: beforeAll: END`
);
await
sleep
(
100
);
await
audioManager
.
getStreamManager
().
then
((
data
)
=>
{
audioStreamManager
=
data
;
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : Success `
);
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : ERROR :
${
err
.
message
}
`
);
});
audioManager
.
getStreamManager
((
err
,
data
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
Tag
}
: Get AudioStream Manager : ERROR :
${
err
.
message
}
`
);
}
else
{
audioStreamManagerCB
=
data
;
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : Success `
);
}
});
audioStreamManager
=
audioManager
.
getStreamManager
();
audioStreamManagerCB
=
audioManager
.
getStreamManager
();
await
sleep
(
1000
);
console
.
info
(
`
${
Tag
}
: beforeAll: END`
);
})
...
...
multimedia/audio/audio_js_standard/AudioRendererChangeInfo/src/main/js/test/AudioRendererChangeInfo.test.js
浏览文件 @
8879d41c
...
...
@@ -25,22 +25,8 @@ describe('audioRendererChange', function () {
console
.
info
(
`
${
Tag
}
: Create AudioManger Object JS Framework`
);
beforeAll
(
async
function
()
{
await
AUDIOMANAGER
.
getStreamManager
().
then
(
function
(
data
)
{
audioStreamManager
=
data
;
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : Success `
);
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : ERROR :
${
err
.
message
}
`
);
});
AUDIOMANAGER
.
getStreamManager
((
err
,
data
)
=>
{
if
(
err
)
{
console
.
error
(
`
${
Tag
}
: Get AudioStream Manager : ERROR :
${
err
.
message
}
`
);
}
else
{
audioStreamManagerCB
=
data
;
console
.
info
(
`
${
Tag
}
: Get AudioStream Manager : Success `
);
}
});
audioStreamManager
=
AUDIOMANAGER
.
getStreamManager
();
audioStreamManagerCB
=
AUDIOMANAGER
.
getStreamManager
();
await
sleep
(
1000
);
console
.
info
(
`
${
Tag
}
: beforeAll: Prerequisites at the test suite level`
);
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
浏览文件 @
8879d41c
...
...
@@ -5175,111 +5175,6 @@ describe('audioFramework', function () {
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0100
*@tc.name : isCommunicationDeviceActive - OUTPUT device - Promise - ENAME
*@tc.desc : isCommunicationDeviceActive - OUTPUT device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0100
'
,
2
,
async
function
(
done
)
{
try
{
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
let
value
=
await
AudioRoutingManager
.
isCommunicationDeviceActive
(
2
);
if
(
value
!=
null
&&
value
!=
undefined
)
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0100 OUT OF BORDER PROMISE: SUCCESS
${
value
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0100 OUT OF BORDER PROMISE: FAIL
${
value
}
`
);
expect
(
false
).
assertTrue
();
done
();
}
}
catch
(
err
)
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_getAudioStreamId_0100 OUT OF BORDER PROMISE: ERROR:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
done
();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0200
*@tc.name : isCommunicationDeviceActive - OUTPUT device - Promise - ENAME
*@tc.desc : isCommunicationDeviceActive - OUTPUT device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0200
'
,
2
,
async
function
(
done
)
{
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
await
AudioRoutingManager
.
isCommunicationDeviceActive
(
2
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise:SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0200 : FAIL
${
err
}
`
);
expect
(
false
).
assertTrue
();
done
();
}
else
{
if
(
value
!=
null
&&
value
!=
undefined
)
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0200 OUT OF BORDER PROMISE: SUCCESS
${
value
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_isCommunicationDeviceActive_0200 OUT OF BORDER PROMISE: FAIL
${
value
}
`
);
expect
(
false
).
assertTrue
();
done
();
}
}
});
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0100
*@tc.name : setCommunicationDevice - OUTPUT device - Promise - ENAME
*@tc.desc : setCommunicationDevice - OUTPUT device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0100
'
,
2
,
async
function
(
done
)
{
try
{
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
await
AudioRoutingManager
.
setCommunicationDevice
(
2
,
true
);
expect
(
true
).
assertTrue
();
}
catch
(
err
)
{
console
.
info
(
`
${
TagFrmwkRender
}
: SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0100 OUT OF BORDER PROMISE: ERROR:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0200
*@tc.name : isCommunicationDeviceActive - OUTPUT device - Promise - ENAME
*@tc.desc : isCommunicationDeviceActive - OUTPUT device
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0200
'
,
2
,
async
function
(
done
)
{
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
await
AudioRoutingManager
.
setCommunicationDevice
(
2
,
true
,
(
err
)
=>
{
if
(
err
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise:SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0200 : FAIL
${
err
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise:SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_setCommunicationDevice_0200 : PASS`
);
expect
(
true
).
assertTrue
();
}
});
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_MICSTATECHANGE_0100
*@tc.name : SUB_MULTIMEDIA_AUDIO_ROUTING_MANAGER_MICSTATECHANGE_0100
...
...
@@ -5472,256 +5367,4 @@ describe('audioFramework', function () {
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_ERRORS_0100'
*@tc.name : AUDIO_ERRORS
*@tc.desc : AUDIO_ERRORS
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_ERRORS_0100
'
,
2
,
async
function
(
done
)
{
expect
(
audio
.
AudioErrors
.
ERROR_INVALID_PARAM
).
assertEqual
(
6800101
);
expect
(
audio
.
AudioErrors
.
ERROR_NO_MEMORY
).
assertEqual
(
6800102
);
expect
(
audio
.
AudioErrors
.
ERROR_ILLEGAL_STATE
).
assertEqual
(
6800103
);
expect
(
audio
.
AudioErrors
.
ERROR_UNSUPPORTED
).
assertEqual
(
6800104
);
expect
(
audio
.
AudioErrors
.
ERROR_TIMEOUT
).
assertEqual
(
6800105
);
expect
(
audio
.
AudioErrors
.
ERROR_STREAM_LIMIT
).
assertEqual
(
6800201
);
expect
(
audio
.
AudioErrors
.
ERROR_SYSTEM
).
assertEqual
(
6800301
);
await
sleep
(
50
);
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_DEFAULT_VOLUME_GROUP_ID_0100'
*@tc.name : DEFAULT_VOLUME_GROUP_ID
*@tc.desc : DEFAULT_VOLUME_GROUP_ID
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_DEFAULT_VOLUME_GROUP_ID_0100
'
,
2
,
async
function
(
done
)
{
expect
(
audio
.
DEFAULT_VOLUME_GROUP_ID
).
assertEqual
(
1
);
expect
(
audio
.
DEFAULT_INTERRUPT_GROUP_ID
).
assertEqual
(
1
);
await
sleep
(
50
);
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETMINVOLUME_0100
* @tc.name : getMinVolume - RINGTONE - Callback
* @tc.desc : getMinVolume
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETMINVOLUME_0100
'
,
2
,
async
function
(
done
)
{
try
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audioGroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
audioGroupManager
.
getMinVolume
(
audio
.
AudioVolumeType
.
RINGTONE
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: failed to getMinVolume : Callback:
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
{
if
(
data
==
minVol
)
{
console
.
info
(
'
AudioFrameworkTest: callback : Ringtone getMinVolume: PASS :
'
+
data
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: callback : Ringtone getMinVolume: FAIL :
'
+
data
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
}
catch
(
err
)
{
console
.
info
(
'
AudioFrameworkTest: getVolumeGroupManager : err:
'
+
err
.
message
);
expect
(
false
).
assertTrue
();
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_MUTE_0100
* @tc.name : mute - RINGTONE - Promise
* @tc.desc : mute - RINGTONE - Promise
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_MUTE_0100
'
,
2
,
async
function
(
done
)
{
try
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audioGroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
audioGroupManager
.
mute
(
audio
.
AudioVolumeType
.
RINGTONE
,
false
).
then
(
function
()
{
console
.
log
(
'
AudioFrameworkTest: Set Stream GroupManager Mute: RINGTONE: Promise: FALSE
'
);
audioGroupManager
.
isMute
(
audio
.
AudioVolumeType
.
RINGTONE
).
then
(
function
(
data
)
{
if
(
data
==
false
)
{
console
.
log
(
`AudioFrameworkTest: Promise:
Is Stream GroupManager Mute RINGTONE: FALSE: PASS:`
+
data
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
log
(
`AudioFrameworkTest: Promise:
Is Stream GroupManager Mute RINGTONE: FALSE: FAIL: `
+
data
);
expect
(
false
).
assertTrue
();
}
done
();
});
}).
catch
((
err
)
=>
{
console
.
info
(
`AudioFrameworkTest: Promise:
Is Stream GroupManager Mute RINGTONE: FALSE: ERROR:`
+
err
.
message
);
expect
(
false
).
assertTrue
();
done
();
});
}
catch
(
err
)
{
console
.
info
(
'
AudioFrameworkTest: getGroupManager mute : parameter err:
'
+
err
.
message
);
expect
(
false
).
assertTrue
();
done
();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ONVOLUMECHANGE_0100
*@tc.name : OnVolumeChange - setVolume - MEDIA
*@tc.desc : OnVolumeChange - setVolume - MEDIA
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ONVOLUMECHANGE_0100
'
,
2
,
async
function
(
done
)
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audiogroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
audioVolumeManager
.
on
(
'
volumeChange
'
,
(
VolumeEvent
)
=>
{
console
.
log
(
`
${
TagFrmwk
}
: Volume Change Event is called`
);
switch
(
VolumeEvent
.
volumeType
)
{
case
audio
.
AudioVolumeType
.
MEDIA
:
console
.
info
(
`
${
TagFrmwk
}
: Audio VolumeEvent is :
${
VolumeEvent
}
`
);
if
(
VolumeEvent
.
volume
==
lowVol
)
{
console
.
info
(
`
${
TagFrmwk
}
: MEDIA CallBack : PASS :
${
VolumeEvent
.
volume
}
`
);
expect
(
true
).
assertTrue
();
}
break
;
default
:
console
.
info
(
`
${
TagFrmwk
}
: Audio VolumeEvent is :
${
VolumeEvent
}
`
);
expect
(
false
).
assertTrue
();
break
;
}
done
();
});
try
{
await
audiogroupManager
.
setVolume
(
audioMedia
,
lowVol
);
console
.
info
(
'
setVolume success
'
)
}
catch
(
err
)
{
console
.
log
(
'
err :
'
+
err
.
message
)
expect
(
false
).
assertTrue
();
done
();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_SETRINGERMODE_0100
*@tc.name : setRingerMode - Normal Mode - Promise - ENAME
*@tc.desc : setRingerMode - Set Ring more to Normal Mode
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_SETRINGERMODE_0100
'
,
2
,
async
function
(
done
)
{
try
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audiogroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
await
audiogroupManager
.
setRingerMode
(
audio
.
AudioRingMode
.
RINGER_MODE_NORMAL
);
let
value
=
await
audiogroupManager
.
getRingerMode
();
if
(
value
==
audio
.
AudioRingMode
.
RINGER_MODE_NORMAL
)
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: setRingerMode RINGER_MODE_NORMAL: PASS :
${
value
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
`
${
TagFrmwk
}
: Promise: setRingerMode RINGER_MODE_NORMAL: FAIL :
${
value
}
`
);
expect
(
false
).
assertTrue
();
}
}
catch
(
err
)
{
console
.
log
(
'
err :
'
+
err
.
message
);
expect
(
false
).
assertTrue
();
}
done
();
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ONRINGMODECHANGE_0100
*@tc.name : OnRingMode - RINGER_MODE_NORMAL
*@tc.desc : OnRingMode - RINGER_MODE_NORMAL
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 2
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ONRINGMODECHANGE_0100
'
,
2
,
async
function
(
done
)
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audiogroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
audiogroupManager
.
on
(
'
ringerModeChange
'
,
(
AudioRingMode
)
=>
{
console
.
log
(
`
${
TagFrmwk
}
: ringerMode Change Event is called`
);
switch
(
AudioRingMode
)
{
case
audio
.
AudioRingMode
.
RINGER_MODE_NORMAL
:
console
.
info
(
`
${
TagFrmwk
}
: Audio ringerMode is :
${
AudioRingMode
}
`
);
console
.
info
(
`
${
TagFrmwk
}
: MEDIA CallBack : PASS :
${
AudioRingMode
}
`
);
expect
(
true
).
assertTrue
();
break
;
default
:
console
.
info
(
`
${
TagFrmwk
}
: Audio VolumeEvent is :
${
AudioRingMode
}
`
);
expect
(
false
).
assertTrue
();
break
;
}
done
();
});
try
{
await
audiogroupManager
.
setRingerMode
(
audio
.
AudioRingMode
.
RINGER_MODE_NORMAL
);
console
.
info
(
'
setRingerMode success
'
)
}
catch
(
err
)
{
console
.
log
(
'
err :
'
+
err
.
message
)
expect
(
false
).
assertTrue
();
done
();
}
})
/**
*@tc.number : SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_SETMICROPHONEMUTE_0100
*@tc.name : setMicrophoneMute - true - Promise
*@tc.desc : Enable mic mute
*@tc.size : MEDIUM
*@tc.type : Function
*@tc.level : Level 1
*/
it
(
'
SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_SETMICROPHONEMUTE_0100
'
,
1
,
async
function
(
done
)
{
try
{
let
audioVolumeManager
=
audioManager
.
getVolumeManager
();
let
volumeGroupInfos
=
await
audioVolumeManager
.
getVolumeGroupInfos
(
audio
.
LOCAL_NETWORK_ID
);
let
groupId_
=
volumeGroupInfos
[
0
].
groupId
;
let
audiogroupManager
=
await
audioVolumeManager
.
getVolumeGroupManager
(
groupId_
);
await
audiogroupManager
.
setMicrophoneMute
(
true
);
let
data
=
await
audiogroupManager
.
isMicrophoneMute
();
if
(
data
==
true
)
{
console
.
log
(
`
${
TagFrmwk
}
: Promise: isMicrophoneMute: TRUE: PASS:
${
data
}
`
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
log
(
`
${
TagFrmwk
}
: Promise: isMicrophoneMute: TRUE: FAIL:
${
data
}
`
);
expect
(
false
).
assertTrue
();
}
}
catch
(
err
)
{
console
.
log
(
'
err :
'
+
err
.
message
);
expect
(
false
).
assertTrue
();
}
done
();
})
})
\ No newline at end of file
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioManagerApi9.test.js
0 → 100644
浏览文件 @
8879d41c
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/List.test.js
浏览文件 @
8879d41c
...
...
@@ -14,4 +14,4 @@
*/
require
(
'
./AudioFramework.test.js
'
)
require
(
'
./AudioManagerApi9.test.js
'
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录