Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
bda17148
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看板
提交
bda17148
编写于
8月 19, 2022
作者:
Q
qinliwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
<媒体子系统部件化整改&Audio部件优化新增用例>
Signed-off-by:
N
qinliwen
<
qinliwen3@huawei.com
>
上级
826c08aa
变更
29
显示空白变更内容
内联
并排
Showing
29 changed file
with
769 addition
and
361 deletion
+769
-361
multimedia/audio/audio_js_standard/audioManager/BUILD.gn
multimedia/audio/audio_js_standard/audioManager/BUILD.gn
+2
-0
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js
...udioManager/src/main/js/test/AudioEventManagement.test.js
+0
-47
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
...dard/audioManager/src/main/js/test/AudioFramework.test.js
+715
-314
multimedia/camera/camera_js_standard/BUILD.gn
multimedia/camera/camera_js_standard/BUILD.gn
+2
-0
multimedia/image/image_js_standard/image/BUILD.gn
multimedia/image/image_js_standard/image/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageColorspace/BUILD.gn
multimedia/image/image_js_standard/imageColorspace/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn
...media/image/image_js_standard/imageDecodeOptions/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageExif/BUILD.gn
multimedia/image/image_js_standard/imageExif/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn
...edia/image/image_js_standard/imageModifyProperty/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imagePacking/BUILD.gn
multimedia/image/image_js_standard/imagePacking/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn
...a/image/image_js_standard/imagePixelMapFramework/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageReceiver/BUILD.gn
multimedia/image/image_js_standard/imageReceiver/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageWebp/BUILD.gn
multimedia/image/image_js_standard/imageWebp/BUILD.gn
+2
-0
multimedia/image/image_js_standard/imageYUV/BUILD.gn
multimedia/image/image_js_standard/imageYUV/BUILD.gn
+2
-0
multimedia/image/image_js_standard/image_ndk_test/BUILD.gn
multimedia/image/image_js_standard/image_ndk_test/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn
multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioDecoder/BUILD.gn
multimedia/media/media_js_standard/audioDecoder/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioEncoder/BUILD.gn
multimedia/media/media_js_standard/audioEncoder/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioPlayer/BUILD.gn
multimedia/media/media_js_standard/audioPlayer/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioRecorder/BUILD.gn
multimedia/media/media_js_standard/audioRecorder/BUILD.gn
+2
-0
multimedia/media/media_js_standard/hlsPlayer/BUILD.gn
multimedia/media/media_js_standard/hlsPlayer/BUILD.gn
+2
-0
multimedia/media/media_js_standard/httpPlayer/BUILD.gn
multimedia/media/media_js_standard/httpPlayer/BUILD.gn
+2
-0
multimedia/media/media_js_standard/recorderFormat/BUILD.gn
multimedia/media/media_js_standard/recorderFormat/BUILD.gn
+2
-0
multimedia/media/media_js_standard/recorderProfile/BUILD.gn
multimedia/media/media_js_standard/recorderProfile/BUILD.gn
+2
-0
multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn
multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn
+2
-0
multimedia/media/media_js_standard/videoDecoder/BUILD.gn
multimedia/media/media_js_standard/videoDecoder/BUILD.gn
+2
-0
multimedia/media/media_js_standard/videoEncoder/BUILD.gn
multimedia/media/media_js_standard/videoEncoder/BUILD.gn
+2
-0
multimedia/media/media_js_standard/videoPlayer/BUILD.gn
multimedia/media/media_js_standard/videoPlayer/BUILD.gn
+2
-0
multimedia/media/media_js_standard/videoRecorder/BUILD.gn
multimedia/media/media_js_standard/videoRecorder/BUILD.gn
+2
-0
未找到文件。
multimedia/audio/audio_js_standard/audioManager/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_manager_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_manager_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioManagerJsTest"
hap_name = "ActsAudioManagerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_audio_framework"
}
}
ohos_js_assets("audio_manager_js_assets") {
ohos_js_assets("audio_manager_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioEventManagement.test.js
浏览文件 @
bda17148
...
@@ -742,51 +742,6 @@ describe('audioEM', function () {
...
@@ -742,51 +742,6 @@ describe('audioEM', function () {
});
});
})
})
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_001
* @tc.name : DeviceType - INVALID
* @tc.desc : DeviceType - INVALID
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_DeviceType_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
DeviceType
.
INVALID
).
assertEqual
(
0
);
await
sleep
(
50
);
done
();
})
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_002
* @tc.name : DeviceType - WIRED_HEADSET
* @tc.desc : DeviceType - WIRED_HEADSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_DeviceType_002
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
DeviceType
.
WIRED_HEADSET
).
assertEqual
(
3
);
await
sleep
(
50
);
done
();
})
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_003
* @tc.name : DeviceType - USB_HEADSET
* @tc.desc : DeviceType - USB_HEADSET
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_DeviceType_003
'
,
0
,
async
function
(
done
)
{
var
resultflag
=
false
;
if
(
audio
.
DeviceType
.
USB_HEADSET
==
22
||
audio
.
DeviceType
.
USB_HEADSET
==
undefined
)
resultflag
=
true
;
expect
(
resultflag
).
assertTrue
();
await
sleep
(
50
);
done
();
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceChangeType_001
* @tc.number : SUB_AUDIO_MANAGER_DeviceChangeType_001
* @tc.name : DeviceChangeType - CONNECT
* @tc.name : DeviceChangeType - CONNECT
...
@@ -814,6 +769,4 @@ describe('audioEM', function () {
...
@@ -814,6 +769,4 @@ describe('audioEM', function () {
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
})
})
\ No newline at end of file
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
浏览文件 @
bda17148
...
@@ -2470,20 +2470,20 @@ describe('audioManager', function () {
...
@@ -2470,20 +2470,20 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_006
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_006
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
a
wait
a
udioManager
.
mute
(
audioMedia
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audioMedia
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
done
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audioMedia
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audioMedia
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audioMedia
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audioMedia
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2497,7 +2497,7 @@ describe('audioManager', function () {
...
@@ -2497,7 +2497,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audioMedia
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audioMedia
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -2515,6 +2515,8 @@ describe('audioManager', function () {
...
@@ -2515,6 +2515,8 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -2576,20 +2578,19 @@ describe('audioManager', function () {
...
@@ -2576,20 +2578,19 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_008
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_008
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audioRingtone
,
highVol
);
await
audioManager
.
setVolume
(
audioRingtone
,
highVol
);
a
wait
a
udioManager
.
mute
(
audioRingtone
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audioRingtone
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audioRingtone
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audioRingtone
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audioRingtone
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audioRingtone
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2603,7 +2604,7 @@ describe('audioManager', function () {
...
@@ -2603,7 +2604,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audioRingtone
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audioRingtone
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -2621,6 +2622,8 @@ describe('audioManager', function () {
...
@@ -2621,6 +2622,8 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -2682,20 +2685,19 @@ describe('audioManager', function () {
...
@@ -2682,20 +2685,19 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_015
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_015
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
highVol
);
a
wait
a
udioManager
.
mute
(
audio
.
AudioVolumeType
.
MEDIA
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audio
.
AudioVolumeType
.
MEDIA
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audio
.
AudioVolumeType
.
MEDIA
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
MEDIA
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2709,7 +2711,7 @@ describe('audioManager', function () {
...
@@ -2709,7 +2711,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
MEDIA
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
MEDIA
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -2727,6 +2729,8 @@ describe('audioManager', function () {
...
@@ -2727,6 +2729,8 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -2788,20 +2792,19 @@ describe('audioManager', function () {
...
@@ -2788,20 +2792,19 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_016
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_016
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
RINGTONE
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
RINGTONE
,
highVol
);
a
wait
a
udioManager
.
mute
(
audio
.
AudioVolumeType
.
RINGTONE
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audio
.
AudioVolumeType
.
RINGTONE
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audio
.
AudioVolumeType
.
RINGTONE
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
RINGTONE
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: Media: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
RINGTONE
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
RINGTONE
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2815,7 +2818,7 @@ describe('audioManager', function () {
...
@@ -2815,7 +2818,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
RINGTONE
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
RINGTONE
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: Media : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -2833,6 +2836,7 @@ describe('audioManager', function () {
...
@@ -2833,6 +2836,7 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -2894,20 +2898,19 @@ describe('audioManager', function () {
...
@@ -2894,20 +2898,19 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_021
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_021
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
highVol
);
a
wait
a
udioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -2921,7 +2924,7 @@ describe('audioManager', function () {
...
@@ -2921,7 +2924,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: VOICE_CALL : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -2939,6 +2942,7 @@ describe('audioManager', function () {
...
@@ -2939,6 +2942,7 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -3000,20 +3004,19 @@ describe('audioManager', function () {
...
@@ -3000,20 +3004,19 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_023
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_023
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
highVol
);
a
wait
a
udioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
true
,
(
err
)
=>
{
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
true
,
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Failed to mute the stream.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
console
.
log
(
'
AudioFrameworkTest: Callback invoked to indicate that the stream is muted.
'
);
});
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
false
,
(
err
)
=>
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
false
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error :
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Callback: Error :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
else
{
else
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
value
)
=>
{
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
value
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
...
@@ -3027,7 +3030,7 @@ describe('audioManager', function () {
...
@@ -3027,7 +3030,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : FALSE: VOICE_ASSISTANT : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -3045,6 +3048,7 @@ describe('audioManager', function () {
...
@@ -3045,6 +3048,7 @@ describe('audioManager', function () {
}
}
done
();
done
();
});
});
});
})
})
/* *
/* *
...
@@ -3108,17 +3112,12 @@ describe('audioManager', function () {
...
@@ -3108,17 +3112,12 @@ describe('audioManager', function () {
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
await
audioManager
.
mute
(
audioMedia
,
true
).
then
(
async
function
()
{
await
audioManager
.
mute
(
audioMedia
,
true
).
then
(
async
function
()
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Media: Promise: TRUE
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Media: Promise: TRUE
'
);
await
audioManager
.
getVolume
(
audioMedia
,
(
err
,
value
)
=>
{
await
audioManager
.
getVolume
(
audioMedia
).
then
((
value
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
if
(
value
==
0
)
{
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
...
@@ -3154,24 +3153,29 @@ describe('audioManager', function () {
...
@@ -3154,24 +3153,29 @@ describe('audioManager', function () {
*/
*/
it
(
'
SUB_AUDIO_MANAGER_mute_018
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_mute_018
'
,
0
,
async
function
(
done
)
{
await
audioManager
.
setVolume
(
audioMedia
,
lowVol
);
await
audioManager
.
setVolume
(
audioMedia
,
lowVol
);
a
wait
a
udioManager
.
mute
(
audioMedia
,
true
,
async
(
err
)
=>
{
audioManager
.
mute
(
audioMedia
,
true
,
async
(
err
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Media : failed to set Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Media : failed to set Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
}
}
else
{
else
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Media: Callback : TRUE
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Media: Callback : TRUE
'
);
await
audioManager
.
getVolume
(
audioMedia
).
then
((
value
)
=>
{
audioManager
.
getVolume
(
audioMedia
,
(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
if
(
value
==
0
)
{
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
await
audioManager
.
setVolume
(
audioMedia
,
highVol
);
a
wait
a
udioManager
.
isMute
(
audioMedia
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audioMedia
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Media : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Media : failed to get Mute Status
${
err
.
message
}
`
);
expect
().
assertFail
();
expect
().
assertFail
();
...
@@ -3251,16 +3255,21 @@ describe('audioManager', function () {
...
@@ -3251,16 +3255,21 @@ describe('audioManager', function () {
}
}
else
{
else
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Ringtone: Callback : SetVolume
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: Ringtone: Callback : SetVolume
'
);
await
audioManager
.
getVolume
(
audioRingtone
).
then
((
value
)
=>
{
audioManager
.
getVolume
(
audioRingtone
,
(
err
,
value
)
=>
{
if
(
value
==
0
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
audioManager
.
setVolume
(
audioRingtone
,
lowVol
);
a
wait
a
udioManager
.
setVolume
(
audioRingtone
,
lowVol
);
audioManager
.
isMute
(
audioRingtone
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audioRingtone
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Ringtone : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: Ringtone : failed to get Mute Status
${
err
.
message
}
`
);
...
@@ -3293,17 +3302,12 @@ describe('audioManager', function () {
...
@@ -3293,17 +3302,12 @@ describe('audioManager', function () {
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
highVol
);
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
true
).
then
(
async
function
()
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
true
).
then
(
async
function
()
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Promise: TRUE
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Promise: TRUE
'
);
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
value
)
=>
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
).
then
((
value
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
if
(
value
==
0
)
{
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
...
@@ -3346,16 +3350,21 @@ describe('audioManager', function () {
...
@@ -3346,16 +3350,21 @@ describe('audioManager', function () {
}
}
else
{
else
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback : SetVolume
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_CALL: Callback : SetVolume
'
);
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
).
then
((
value
)
=>
{
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
value
)
=>
{
if
(
value
==
0
)
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
lowVol
);
a
wait
a
udioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
lowVol
);
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_CALL
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: VOICE_CALL : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: VOICE_CALL : failed to get Mute Status
${
err
.
message
}
`
);
...
@@ -3388,17 +3397,12 @@ describe('audioManager', function () {
...
@@ -3388,17 +3397,12 @@ describe('audioManager', function () {
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
highVol
);
await
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
highVol
);
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
true
).
then
(
async
function
()
{
await
audioManager
.
mute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
true
).
then
(
async
function
()
{
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Promise: TRUE
'
);
console
.
log
(
'
AudioFrameworkTest: Set Stream Mute: VOICE_ASSISTANT: Promise: TRUE
'
);
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
value
)
=>
{
await
audioManager
.
getVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
).
then
((
value
)
=>
{
if
(
err
)
{
console
.
error
(
`Failed to obtain the volume.
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
}
else
if
(
value
==
0
)
{
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
console
.
info
(
"
AudioFrameworkTest: value is
"
+
value
);
if
(
value
==
0
)
{
expect
(
true
).
assertTrue
();
expect
(
true
).
assertTrue
();
}
}
else
{
else
{
console
.
info
(
"
AudioFrameworkTest: mute fail
"
);
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
...
@@ -3450,7 +3454,7 @@ describe('audioManager', function () {
...
@@ -3450,7 +3454,7 @@ describe('audioManager', function () {
expect
(
false
).
assertTrue
();
expect
(
false
).
assertTrue
();
}
}
});
});
audioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
lowVol
);
a
wait
a
udioManager
.
setVolume
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
lowVol
);
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
data
)
=>
{
audioManager
.
isMute
(
audio
.
AudioVolumeType
.
VOICE_ASSISTANT
,
(
err
,
data
)
=>
{
if
(
err
)
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: VOICE_ASSISTANT : failed to get Mute Status
${
err
.
message
}
`
);
console
.
error
(
`AudioFrameworkTest: Callback : SetVolume: VOICE_ASSISTANT : failed to get Mute Status
${
err
.
message
}
`
);
...
@@ -4911,178 +4915,168 @@ describe('audioManager', function () {
...
@@ -4911,178 +4915,168 @@ describe('audioManager', function () {
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_001
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_001
* @tc.name : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.name : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.desc : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.desc : InterruptType - INTERRUPT_TYPE_BEGIN
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_001
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptType
.
INTERRUPT_TYPE_BEGIN
).
assertEqual
(
1
);
expect
(
audio
.
InterruptType
.
INTERRUPT_TYPE_BEGIN
).
assertEqual
(
1
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_002
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_002
* @tc.name : InterruptType - INTERRUPT_TYPE_END
* @tc.name : InterruptType - INTERRUPT_TYPE_END
* @tc.desc : InterruptType - INTERRUPT_TYPE_END
* @tc.desc : InterruptType - INTERRUPT_TYPE_END
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_002
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptType
.
INTERRUPT_TYPE_END
).
assertEqual
(
2
);
expect
(
audio
.
InterruptType
.
INTERRUPT_TYPE_END
).
assertEqual
(
2
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_003
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_003
* @tc.name : InterruptHint - INTERRUPT_HINT_NONE
* @tc.name : InterruptHint - INTERRUPT_HINT_NONE
* @tc.desc : InterruptHint - INTERRUPT_HINT_NONE
* @tc.desc : InterruptHint - INTERRUPT_HINT_NONE
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_003
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_003
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_NONE
).
assertEqual
(
0
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_NONE
).
assertEqual
(
0
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_004
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_004
* @tc.name : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.name : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.desc : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.desc : InterruptHint - INTERRUPT_HINT_RESUME
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_004
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_004
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_RESUME
).
assertEqual
(
1
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_RESUME
).
assertEqual
(
1
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_005
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_005
* @tc.name : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.name : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.desc : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.desc : InterruptHint - INTERRUPT_HINT_PAUSE
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_005
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_005
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_PAUSE
).
assertEqual
(
2
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_PAUSE
).
assertEqual
(
2
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_006
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_006
* @tc.name : InterruptHint - INTERRUPT_HINT_STOP
* @tc.name : InterruptHint - INTERRUPT_HINT_STOP
* @tc.desc : InterruptHint - INTERRUPT_HINT_STOP
* @tc.desc : InterruptHint - INTERRUPT_HINT_STOP
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_006
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_006
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_STOP
).
assertEqual
(
3
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_STOP
).
assertEqual
(
3
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_007
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_007
* @tc.name : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.name : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_DUCK
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_007
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_007
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_DUCK
).
assertEqual
(
4
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_DUCK
).
assertEqual
(
4
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_008
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_008
* @tc.name : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.name : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.desc : InterruptHint - INTERRUPT_HINT_UNDUCK
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_008
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_008
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_UNDUCK
).
assertEqual
(
5
);
expect
(
audio
.
InterruptHint
.
INTERRUPT_HINT_UNDUCK
).
assertEqual
(
5
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_009
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_009
* @tc.name : InterruptForceType - INTERRUPT_FORCE
* @tc.name : InterruptForceType - INTERRUPT_FORCE
* @tc.desc : InterruptForceType - INTERRUPT_FORCE
* @tc.desc : InterruptForceType - INTERRUPT_FORCE
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_009
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_009
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptForceType
.
INTERRUPT_FORCE
).
assertEqual
(
0
);
expect
(
audio
.
InterruptForceType
.
INTERRUPT_FORCE
).
assertEqual
(
0
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt
_010
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT
_010
* @tc.name : InterruptForceType - INTERRUPT_SHARE
* @tc.name : InterruptForceType - INTERRUPT_SHARE
* @tc.desc : InterruptForceType - INTERRUPT_SHARE
* @tc.desc : InterruptForceType - INTERRUPT_SHARE
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_interrupt_009
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_INTERRUPT_010
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
InterruptForceType
.
INTERRUPT_SHARE
).
assertEqual
(
1
);
expect
(
audio
.
InterruptForceType
.
INTERRUPT_SHARE
).
assertEqual
(
1
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt_010
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT_011
* @tc.name : ActiveDeviceType - BLUETOOTH_SCO
* @tc.name : ActiveDeviceType - BLUETOOTH_SCO
* @tc.desc : ActiveDeviceType - BLUETOOTH_SCO
* @tc.desc : ActiveDeviceType - BLUETOOTH_SCO
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_
interrupt_010
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_
INTERRUPT_011
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
ActiveDeviceType
.
BLUETOOTH_SCO
).
assertEqual
(
7
);
expect
(
audio
.
ActiveDeviceType
.
BLUETOOTH_SCO
).
assertEqual
(
7
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_
interrupt_011
* @tc.number : SUB_AUDIO_MANAGER_
INTERRUPT_012
* @tc.name : ActiveDeviceType - SPEAKER
* @tc.name : ActiveDeviceType - SPEAKER
* @tc.desc : ActiveDeviceType - SPEAKER
* @tc.desc : ActiveDeviceType - SPEAKER
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_
interrupt_011
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_
INTERRUPT_012
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
ActiveDeviceType
.
SPEAKER
).
assertEqual
(
2
);
expect
(
audio
.
ActiveDeviceType
.
SPEAKER
).
assertEqual
(
2
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
...
@@ -5118,28 +5112,435 @@ describe('audioManager', function () {
...
@@ -5118,28 +5112,435 @@ describe('audioManager', function () {
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_001
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_001
* @tc.name : DeviceType -
BLUETOOTH_SCO
* @tc.name : DeviceType -
ALL Device Type
* @tc.desc : DeviceType -
BLUETOOTH_SCO
* @tc.desc : DeviceType -
ALL Device Type
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_DeviceType_001
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_DeviceType_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
DeviceType
.
INVALID
).
assertEqual
(
0
);
console
.
info
(
"
audio.DeviceType.INVALID:
"
+
audio
.
DeviceType
.
INVALID
);
expect
(
audio
.
DeviceType
.
EARPIECE
).
assertEqual
(
1
);
console
.
info
(
"
audio.DeviceType.EARPIECE:
"
+
audio
.
DeviceType
.
EARPIECE
);
expect
(
audio
.
DeviceType
.
SPEAKER
).
assertEqual
(
2
);
console
.
info
(
"
audio.DeviceType.SPEAKER:
"
+
audio
.
DeviceType
.
SPEAKER
);
expect
(
audio
.
DeviceType
.
WIRED_HEADSET
).
assertEqual
(
3
);
console
.
info
(
"
audio.DeviceType.WIRED_HEADSET:
"
+
audio
.
DeviceType
.
WIRED_HEADSET
);
expect
(
audio
.
DeviceType
.
WIRED_HEADPHONES
).
assertEqual
(
4
);
console
.
info
(
"
audio.DeviceType.WIRED_HEADPHONES:
"
+
audio
.
DeviceType
.
WIRED_HEADPHONES
);
expect
(
audio
.
DeviceType
.
BLUETOOTH_SCO
).
assertEqual
(
7
);
expect
(
audio
.
DeviceType
.
BLUETOOTH_SCO
).
assertEqual
(
7
);
console
.
info
(
"
audio.DeviceType.BLUETOOTH_SCO:
"
+
audio
.
DeviceType
.
BLUETOOTH_SCO
);
expect
(
audio
.
DeviceType
.
BLUETOOTH_A2DP
).
assertEqual
(
8
);
console
.
info
(
"
audio.DeviceType.BLUETOOTH_A2DP:
"
+
audio
.
DeviceType
.
BLUETOOTH_A2DP
);
expect
(
audio
.
DeviceType
.
MIC
).
assertEqual
(
15
);
console
.
info
(
"
audio.DeviceType.MIC:
"
+
audio
.
DeviceType
.
MIC
);
expect
(
audio
.
DeviceType
.
USB_HEADSET
).
assertEqual
(
22
);
console
.
info
(
"
audio.DeviceType.USB_HEADSET:
"
+
audio
.
DeviceType
.
USB_HEADSET
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
/* *
/* *
* @tc.number : SUB_AUDIO_MANAGER_DeviceType_002
* @tc.number : SUB_AUDIO_MANAGER_DeviceRole_001
* @tc.name : DeviceType - WIRED_HEADPHONES
* @tc.name : DeviceRole - ALL Device Role
* @tc.desc : DeviceType - WIRED_HEADPHONES
* @tc.desc : DeviceRole - ALL Device Role
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
*/
*/
it
(
'
SUB_AUDIO_MANAGER_DeviceType_002
'
,
0
,
async
function
(
done
)
{
it
(
'
SUB_AUDIO_MANAGER_DeviceRole_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
DeviceType
.
WIRED_HEADPHONES
).
assertEqual
(
4
);
expect
(
audio
.
DeviceRole
.
INPUT_DEVICE
).
assertEqual
(
1
);
console
.
info
(
"
audio.DeviceRole.INPUT_DEVICE :
"
+
audio
.
DeviceRole
.
INPUT_DEVICE
);
expect
(
audio
.
DeviceRole
.
OUTPUT_DEVICE
).
assertEqual
(
2
);
console
.
info
(
"
audio.DeviceRole.OUTPUT_DEVICE :
"
+
audio
.
DeviceRole
.
OUTPUT_DEVICE
);
await
sleep
(
50
);
done
();
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_001
* @tc.name : getDevices - Output device - Callback
* @tc.desc : getDevices - Output device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_001
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
1
,
(
err
,
value
)
=>
{
// Getting all Output devices Enumb 1 = OUTPUT_DEVICES_FLAG
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback: OUTPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_002
* @tc.name : getDevices - Input device - Callback
* @tc.desc : getDevices - Input device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_002
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
2
,
(
err
,
value
)
=>
{
// Getting all Input Devices ENUM 2 = INPUT_DEVICES_FLAG
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_003
* @tc.name : getDevices - ALL device - Callback
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_003
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
3
,
(
err
,
value
)
=>
{
// Getting all devies connected 3 = ALL_DEVICES_FLAG
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback:ALL_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_004
* @tc.name : getDevices - Output device - Callback - ENAME
* @tc.desc : getDevices - Output device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_004
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
OUTPUT_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback:OUTPUT_DEVICES_FLAG:failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices OUTPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : OUTPUT_DEVICES_FLAG : FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_005
* @tc.name : getDevices - Input device - Callback - ENAME
* @tc.desc : getDevices - Input device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_005
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
INPUT_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback:INPUT_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices INPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : INPUT_DEVICES_FLAG: FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_006
* @tc.name : getDevices - ALL device - Callback - ENAME
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_006
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
ALL_DEVICES_FLAG
,
(
err
,
value
)
=>
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG
'
);
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback: ALL_DEVICES_FLAG: failed to get devices
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices ALL_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Callback: getDevices : ALL_DEVICES_FLAG: FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_008
* @tc.name : getDevices - OUTPUT device - Promise - ENAME
* @tc.desc : getDevices - OUTPUT device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_008
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
let
AudioRoutingManager
=
await
audioManager
.
getRoutingManager
();
let
value
=
await
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
OUTPUT_DEVICES_FLAG
);
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices OUTPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices:OUTPUT_DEVICES_FLAG : FAIL
'
);
expect
(
false
).
assertTrue
();
}
done
();
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_009
* @tc.name : getDevices - INPUT device - Promise - ENAME
* @tc.desc : getDevices - INPUT device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_009
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
audioManager
.
getRoutingManager
(
async
(
err
,
AudioRoutingManager
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest: Callback: failed to get RoutingManager
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
let
value
=
await
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
INPUT_DEVICES_FLAG
)
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices INPUT_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices : INPUT_DEVICES_FLAG : FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_ROUTING_MANAGER_getDevices_010
* @tc.name : getDevices - ALL device - Promise - ENAME
* @tc.desc : getDevices - ALL device
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_ROUTING_MANAGER_getDevices_010
'
,
0
,
async
function
(
done
)
{
dRValue
=
null
;
dTValue
=
null
;
devId
=
null
;
devName
=
null
;
devAddr
=
null
;
sRate
=
null
;
cCount
=
null
;
cMask
=
null
;
audioManager
.
getRoutingManager
(
async
(
err
,
AudioRoutingManager
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTest:Callback:failed to get RoutingManager
${
err
.
message
}
`
);
expect
().
assertFail
();
}
else
{
let
value
=
await
AudioRoutingManager
.
getDevices
(
audio
.
DeviceFlag
.
ALL_DEVICES_FLAG
)
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices ALL_DEVICES_FLAG
'
);
value
.
forEach
(
displayDeviceProp
);
if
(
dTValue
!=
null
&&
dRValue
!=
null
&&
devId
>
0
&&
sRate
!=
null
&&
cCount
!=
null
&&
cMask
!=
null
)
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : PASS
'
);
expect
(
true
).
assertTrue
();
}
else
{
console
.
info
(
'
AudioFrameworkTest: Promise: getDevices : ALL_DEVICES_FLAG : FAIL
'
);
expect
(
false
).
assertTrue
();
}
}
done
();
});
})
/* *
* @tc.number : SUB_AUDIO_DeviceFlag_001
* @tc.name : NONE_DEVICES_FLAG
* @tc.desc : NONE_DEVICES_FLAG
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_DeviceFlag_001
'
,
0
,
async
function
(
done
)
{
expect
(
audio
.
DeviceFlag
.
OUTPUT_DEVICES_FLAG
).
assertEqual
(
1
);
expect
(
audio
.
DeviceFlag
.
INPUT_DEVICES_FLAG
).
assertEqual
(
2
);
expect
(
audio
.
DeviceFlag
.
ALL_DEVICES_FLAG
).
assertEqual
(
3
);
await
sleep
(
50
);
await
sleep
(
50
);
done
();
done
();
})
})
...
...
multimedia/camera/camera_js_standard/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("camera_standard_ets_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("camera_standard_ets_hap") {
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsCameraStandardETSTest"
hap_name = "ActsCameraStandardETSTest"
subsystem_name = "multimedia"
part_name = "multimedia_camera_standard"
}
}
ohos_js_assets("camera_ets_assets") {
ohos_js_assets("camera_ets_assets") {
source_dir = "./src/main/ets/MainAbility"
source_dir = "./src/main/ets/MainAbility"
...
...
multimedia/image/image_js_standard/image/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageJsTest"
hap_name = "ActsImageJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_js_assets") {
ohos_js_assets("image_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageColorspace/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_colorspace_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_colorspace_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageColorspaceJsTest"
hap_name = "ActsImageColorspaceJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_colorspace_js_assets") {
ohos_js_assets("image_colorspace_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageDecodeOptions/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_DecodeOptions_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_DecodeOptions_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageDecodeOptionsJsTest"
hap_name = "ActsImageDecodeOptionsJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_DecodeOptions_js_assets") {
ohos_js_assets("image_DecodeOptions_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageExif/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_exif_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_exif_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageExifJsTest"
hap_name = "ActsImageExifJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_exif_js_assets") {
ohos_js_assets("image_exif_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/image/image_js_standard/imageModifyProperty/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_modifyProperty_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_modifyProperty_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageModifyPropertyJsTest"
hap_name = "ActsImageModifyPropertyJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_modifyProperty_js_assets") {
ohos_js_assets("image_modifyProperty_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imagePacking/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_packing_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_packing_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImagePackingJsTest"
hap_name = "ActsImagePackingJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_packing_js_assets") {
ohos_js_assets("image_packing_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imagePixelMapFramework/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_pixelmapframework_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_pixelmapframework_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImagePixelMapFrameworkJsTest"
hap_name = "ActsImagePixelMapFrameworkJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_pixelmapframework_js_assets") {
ohos_js_assets("image_pixelmapframework_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageReceiver/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_receiver_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_receiver_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageReceiverJsTest"
hap_name = "ActsImageReceiverJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_receiver_js_assets") {
ohos_js_assets("image_receiver_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageWebp/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_webp_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_webp_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageWebpJsTest"
hap_name = "ActsImageWebpJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_webp_js_assets") {
ohos_js_assets("image_webp_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/imageYUV/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_yuv_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("image_yuv_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageyuvJsTest"
hap_name = "ActsImageyuvJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
}
}
ohos_js_assets("image_yuv_js_assets") {
ohos_js_assets("image_yuv_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/image/image_js_standard/image_ndk_test/BUILD.gn
浏览文件 @
bda17148
...
@@ -23,6 +23,8 @@ ohos_js_hap_suite("image_pixelmap_ndk_hap") {
...
@@ -23,6 +23,8 @@ ohos_js_hap_suite("image_pixelmap_ndk_hap") {
ets2abc = true
ets2abc = true
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsPixelMapNapiEtsTest"
hap_name = "ActsPixelMapNapiEtsTest"
subsystem_name = "multimedia"
part_name = "multimedia_image_standard"
shared_libraries = [ "./entry/src/main/cpp:imagePixelmap" ]
shared_libraries = [ "./entry/src/main/cpp:imagePixelmap" ]
}
}
...
...
multimedia/media/media_js_standard/audioCodecFormat/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_codec_format_js_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_codec_format_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioCodecFormatJsTest"
hap_name = "ActsAudioCodecFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("audio_codec_format_js_assets") {
ohos_js_assets("audio_codec_format_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/audioDecoder/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_decoder_js_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_decoder_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioDecoderJsTest"
hap_name = "ActsAudioDecoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("audio_decoder_js_assets") {
ohos_js_assets("audio_decoder_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/audioEncoder/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_encoder_js_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("audio_encoder_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioEncoderJsTest"
hap_name = "ActsAudioEncoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("audio_encoder_js_assets") {
ohos_js_assets("audio_encoder_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/audioPlayer/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_player_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_player_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioPlayerJsTest"
hap_name = "ActsAudioPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("audio_player_js_assets") {
ohos_js_assets("audio_player_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/media/media_js_standard/audioRecorder/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_recorder_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("audio_recorder_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAudioRecorderJsTest"
hap_name = "ActsAudioRecorderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("audio_recorder_js_assets") {
ohos_js_assets("audio_recorder_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/hlsPlayer/BUILD.gn
浏览文件 @
bda17148
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("hls_player_js_hap") {
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("hls_player_js_hap") {
# ]
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHLSPlayerJsTest"
hap_name = "ActsHLSPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
# subsystem_name = "xts"
...
...
multimedia/media/media_js_standard/httpPlayer/BUILD.gn
浏览文件 @
bda17148
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("http_player_js_hap") {
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("http_player_js_hap") {
# ]
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHTTPPlayerJsTest"
hap_name = "ActsHTTPPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
# subsystem_name = "xts"
...
...
multimedia/media/media_js_standard/recorderFormat/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("recorder_format_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("recorder_format_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsRecorderFormatJsTest"
hap_name = "ActsRecorderFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("recorder_format_js_assets") {
ohos_js_assets("recorder_format_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/media/media_js_standard/recorderProfile/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("recorder_profile_js_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("recorder_profile_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsRecorderProfileJsTest"
hap_name = "ActsRecorderProfileJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("profile_js_assets") {
ohos_js_assets("profile_js_assets") {
js2abc = true
js2abc = true
...
...
multimedia/media/media_js_standard/videoCodecFormat/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_codec_format_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_codec_format_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoCodecFormatJsTest"
hap_name = "ActsVideoCodecFormatJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("video_codec_format_js_assets") {
ohos_js_assets("video_codec_format_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/videoDecoder/BUILD.gn
浏览文件 @
bda17148
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_decoder_js_hap") {
...
@@ -21,6 +21,8 @@ ohos_js_hap_suite("video_decoder_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoDecoderJsTest"
hap_name = "ActsVideoDecoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("video_decoder_js_assets") {
ohos_js_assets("video_decoder_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/videoEncoder/BUILD.gn
浏览文件 @
bda17148
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("video_encoder_js_hap") {
...
@@ -22,6 +22,8 @@ ohos_js_hap_suite("video_encoder_js_hap") {
]
]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoEncoderJsTest"
hap_name = "ActsVideoEncoderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
}
}
ohos_js_assets("video_encoder_js_assets") {
ohos_js_assets("video_encoder_js_assets") {
source_dir = "./src/main/js/default"
source_dir = "./src/main/js/default"
...
...
multimedia/media/media_js_standard/videoPlayer/BUILD.gn
浏览文件 @
bda17148
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("video_player_js_hap") {
...
@@ -27,6 +27,8 @@ ohos_js_hap_suite("video_player_js_hap") {
# ]
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoPlayerJsTest"
hap_name = "ActsVideoPlayerJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
# subsystem_name = "xts"
...
...
multimedia/media/media_js_standard/videoRecorder/BUILD.gn
浏览文件 @
bda17148
...
@@ -25,6 +25,8 @@ ohos_js_hap_suite("video_recorder_js_hap") {
...
@@ -25,6 +25,8 @@ ohos_js_hap_suite("video_recorder_js_hap") {
# ]
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsVideoRecorderJsTest"
hap_name = "ActsVideoRecorderJsTest"
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
# part_name = "prebuilt_hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
# subsystem_name = "xts"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录