Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5c7ee5ee
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看板
提交
5c7ee5ee
编写于
11月 02, 2021
作者:
O
openharmony_ci
提交者:
Gitee
11月 02, 2021
浏览文件
操作
浏览文件
下载
差异文件
!1028 multmedia子系统测试套适配更新
Merge pull request !1028 from tianfenxia/master
上级
057edcb9
2e326e93
变更
24
展开全部
显示空白变更内容
内联
并排
Showing
24 changed file
with
2844 addition
and
2373 deletion
+2844
-2373
multimedia/audio/audio_js_standard/audioManager/Test.json
multimedia/audio/audio_js_standard/audioManager/Test.json
+1
-1
multimedia/audio/audio_js_standard/audioManager/src/main/config.json
...audio/audio_js_standard/audioManager/src/main/config.json
+65
-51
multimedia/audio/audio_js_standard/audioManager/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
...a/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
+35
-0
multimedia/audio/audio_js_standard/audioManager/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
...ohos/acts/multimedia/audio/audioplayer/MyApplication.java
+29
-0
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
...dard/audioManager/src/main/js/test/AudioFramework.test.js
+1753
-1622
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioPerf.test.js
..._standard/audioManager/src/main/js/test/AudioPerf.test.js
+274
-242
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
-4
multimedia/audio/audio_js_standard/audioPlayer/Test.json
multimedia/audio/audio_js_standard/audioPlayer/Test.json
+35
-35
multimedia/audio/audio_js_standard/audioPlayer/src/main/config.json
.../audio/audio_js_standard/audioPlayer/src/main/config.json
+66
-52
multimedia/audio/audio_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
...a/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
+35
-0
multimedia/audio/audio_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
...ohos/acts/multimedia/audio/audioplayer/MyApplication.java
+29
-0
multimedia/audio/audio_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
...oPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
+51
-56
multimedia/audio/audio_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
...layer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
+32
-50
multimedia/audio/audio_js_standard/audioPlayer_API/Test.json
multimedia/audio/audio_js_standard/audioPlayer_API/Test.json
+32
-32
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/config.json
...io/audio_js_standard/audioPlayer_API/src/main/config.json
+68
-54
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/java/ohos/acts/multimedia/audio/audioplayerapi/MainAbility.java
...hos/acts/multimedia/audio/audioplayerapi/MainAbility.java
+35
-0
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/java/ohos/acts/multimedia/audio/audioplayerapi/MyApplication.java
...s/acts/multimedia/audio/audioplayerapi/MyApplication.java
+29
-0
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/js/test/PlayerLocalTestAudioAPI.test.js
...ayer_API/src/main/js/test/PlayerLocalTestAudioAPI.test.js
+46
-56
multimedia/audio/audio_js_standard/audioRecorder/Test.json
multimedia/audio/audio_js_standard/audioRecorder/Test.json
+11
-1
multimedia/audio/audio_js_standard/audioRecorder/src/main/config.json
...udio/audio_js_standard/audioRecorder/src/main/config.json
+65
-51
multimedia/audio/audio_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
...a/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
+35
-0
multimedia/audio/audio_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
...ohos/acts/multimedia/audio/audioplayer/MyApplication.java
+29
-0
multimedia/audio/audio_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
...corder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
+51
-35
multimedia/audio/audio_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
...order/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
+37
-31
未找到文件。
multimedia/audio/audio_js_standard/audioManager/Test.json
浏览文件 @
5c7ee5ee
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for audio manager Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
48
00000"
,
"test-timeout"
:
"
2
00000"
,
"package"
:
"ohos.acts.multimedia.audio.audiomanager"
,
"shell-timeout"
:
"60000"
},
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/config.json
浏览文件 @
5c7ee5ee
{
"app"
:
{
"bundleName"
:
"ohos.acts.multimedia.audio.audiomanager"
,
"apiVersion"
:
{
"compatible"
:
6
,
"releaseType"
:
"Beta1"
,
"target"
:
7
},
"vendor"
:
"acts"
,
"bundleName"
:
"ohos.acts.multimedia.audio.audiomanager"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
"code"
:
1000000
,
"name"
:
"1.0.0"
}
},
"apiVersion
"
:
{
"
compatible"
:
6
,
"target"
:
5
"deviceConfig
"
:
{
"
default"
:
{
"debug"
:
true
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"ohos.acts.multimedia.audio.audiomanager"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"iconId"
:
16777218
,
"skills"
:
[
{
"entities"
:
[
...
...
@@ -35,15 +31,33 @@
]
}
],
"descriptionId"
:
16777217
,
"visible"
:
true
,
"name"
:
"ohos.acts.multimedia.audio.audiomanager.MainAbility"
,
"labelId"
:
16777216
,
"icon"
:
"$media:icon"
,
"name"
:
"ohos.acts.multimedia.audio.audiomanager.MainAbility"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"homeAbility"
:
true
,
"launchType"
:
"standard"
}
],
"deviceType"
:
[
"phone"
,
"tablet"
,
"tv"
,
"wearable"
],
"mainAbility"
:
"ohos.acts.multimedia.audio.audiomanager.MainAbility"
,
"distro"
:
{
"moduleType"
:
"entry"
,
"installationFree"
:
false
,
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
},
"package"
:
"ohos.acts.multimedia.audio.audiomanager"
,
"name"
:
".MyApplication"
,
"js"
:
[
{
"pages"
:
[
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
0 → 100644
浏览文件 @
5c7ee5ee
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.audio.audioplayer
;
import
ohos.ace.ability.AceAbility
;
import
ohos.aafwk.content.Intent
;
/*
* java MainAbility
*/
public
class
MainAbility
extends
AceAbility
{
@Override
public
void
onStart
(
Intent
intent
)
{
super
.
onStart
(
intent
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
}
}
multimedia/audio/audio_js_standard/audioManager/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
0 → 100644
浏览文件 @
5c7ee5ee
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.audio.audioplayer
;
import
ohos.aafwk.ability.AbilityPackage
;
/*
* java MyApplication
*/
public
class
MyApplication
extends
AbilityPackage
{
@Override
public
void
onInitialize
()
{
super
.
onInitialize
();
}
}
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioFramework.test.js
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/AudioPerf.test.js
浏览文件 @
5c7ee5ee
...
...
@@ -19,10 +19,10 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe
(
'
audioApiResponseTime
'
,
function
()
{
console
.
info
(
'
AudioFrameworkTestPerf: Running AudioManger API Perfomance Test
'
);
var
audioMedia
=
3
;
var
audioRingtone
=
2
;
var
maxVol
=
15
;
var
lowVol
=
5
;
var
AUDIO_MEDIA
=
3
;
var
AUDIO_RINGTONE
=
2
;
var
MAX_VOL
=
15
;
var
LOW_VOL
=
5
;
var
MAXNUM
=
1000
;
var
err
;
...
...
@@ -50,11 +50,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_001
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
setVolume
(
audioRingtone
,
maxVol
);
audioManagerPerf
.
setVolume
(
AUDIO_RINGTONE
,
MAX_VOL
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -79,11 +80,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_002
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
setVolume
(
audioMedia
,
lowVol
,(
err
,
value
)
=>
{
audioManagerPerf
.
setVolume
(
AUDIO_MEDIA
,
LOW_VOL
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -113,11 +115,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_003
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getVolume
(
audioRingtone
);
audioManagerPerf
.
getVolume
(
AUDIO_RINGTONE
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -142,11 +145,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_004
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getVolume
(
audioMedia
,(
err
,
value
)
=>
{
audioManagerPerf
.
getVolume
(
AUDIO_MEDIA
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -176,11 +180,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_005
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getMinVolume
(
audioMedia
);
audioManagerPerf
.
getMinVolume
(
AUDIO_MEDIA
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -205,11 +210,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_006
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getMinVolume
(
audioRingtone
,(
err
,
value
)
=>
{
audioManagerPerf
.
getMinVolume
(
AUDIO_RINGTONE
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -239,11 +245,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_007
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getMaxVolume
(
audioMedia
);
audioManagerPerf
.
getMaxVolume
(
AUDIO_MEDIA
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -268,11 +275,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_008
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
getMaxVolume
(
audioRingtone
,(
err
,
value
)
=>
{
audioManagerPerf
.
getMaxVolume
(
AUDIO_RINGTONE
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -302,11 +310,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_009
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
mute
(
audioMedia
,
true
);
audioManagerPerf
.
mute
(
AUDIO_MEDIA
,
true
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -331,11 +340,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_010
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
mute
(
audioRingtone
,
true
,(
err
,
value
)
=>
{
audioManagerPerf
.
mute
(
AUDIO_RINGTONE
,
true
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -365,11 +375,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_011
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
isMute
(
audioMedia
);
audioManagerPerf
.
isMute
(
AUDIO_MEDIA
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -394,11 +405,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_012
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
isMute
(
audioRingtone
,(
err
,
value
)
=>
{
audioManagerPerf
.
isMute
(
AUDIO_RINGTONE
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -428,11 +440,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_013
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
isActive
(
audioMedia
);
audioManagerPerf
.
isActive
(
AUDIO_MEDIA
);
};
let
waitTime
=
new
Date
().
getTime
()
-
startTime
;
let
avgTime
=
waitTime
/
MAXNUM
;
...
...
@@ -457,11 +470,12 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_014
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
for
(
let
i
=
0
;
i
<
MAXNUM
;
i
++
)
{
audioManagerPerf
.
isActive
(
audioRingtone
,(
err
,
value
)
=>
{
audioManagerPerf
.
isActive
(
AUDIO_RINGTONE
,(
err
,
value
)
=>
{
if
(
err
)
{
console
.
error
(
`AudioFrameworkTestPerf: callback : ERROR :
${
err
.
message
}
`
);
expect
(
false
).
assertTrue
();
...
...
@@ -491,6 +505,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_015
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -520,6 +535,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_016
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -554,6 +570,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_017
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -583,6 +600,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_018
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -617,6 +635,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_019
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -646,6 +665,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_020
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -680,6 +700,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_021
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -709,6 +730,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_022
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -743,6 +765,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_023
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -772,6 +795,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_024
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -806,6 +830,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_025
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -835,6 +860,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_026
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -869,6 +895,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_027
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -898,6 +925,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_028
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -932,6 +960,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_029
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -961,6 +990,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_030
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -995,6 +1025,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_031
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
@@ -1024,6 +1055,7 @@ describe('audioApiResponseTime', function () {
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
SUB_AUDIO_MANAGER_Performance_032
'
,
0
,
function
(
done
)
{
let
audioManagerPerf
=
audio
.
getAudioManager
();
let
startTime
=
new
Date
().
getTime
();
...
...
multimedia/audio/audio_js_standard/audioManager/src/main/js/test/List.test.js
浏览文件 @
5c7ee5ee
...
...
@@ -13,8 +13,5 @@
* limitations under the License.
*/
// require('./AudioPerf.test.js')
require
(
'
./AudioFramework.test.js
'
)
//require('./AudioFramework.test-Gitee.js')
//require('./AudioCapturer.test.js')
//require('./AudioRenderer.test.js')
\ No newline at end of file
multimedia/audio/audio_js_standard/audioPlayer/Test.json
浏览文件 @
5c7ee5ee
...
...
@@ -2,7 +2,7 @@
"description"
:
"Configuration for audioPlayer Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
3
000000"
,
"test-timeout"
:
"
2
000000"
,
"package"
:
"ohos.acts.multimedia.audio.audioplayer"
,
"shell-timeout"
:
"60000"
},
...
...
@@ -12,39 +12,32 @@
"pre-push"
:
[
],
"push"
:
[
"resource/audio/01.mp3 ->/data/media/"
,
"resource/audio/02.mp3 ->/data/media/"
,
"resource/audio/03.mp3 ->/data/media/"
,
"resource/audio/04.mp3 ->/data/media/"
,
"resource/audio/47.mp4 ->/data/media/"
,
"resource/audio/49.mp4 ->/data/media/"
,
"resource/audio/50.mp4 ->/data/media/"
,
"resource/audio/51.mp4 ->/data/media/"
,
"resource/audio/54.mp4 ->/data/media/"
,
"resource/audio/55.m4a ->/data/media/"
,
"resource/audio/57.m4a ->/data/media/"
,
"resource/audio/58.m4a ->/data/media/"
,
"resource/audio/59.m4a ->/data/media/"
,
"resource/audio/62.m4a ->/data/media/"
,
"resource/audio/64.mp4 ->/data/media/"
,
"resource/audio/65.mp4 ->/data/media/"
,
"resource/audio/66.mp4 ->/data/media/"
,
"resource/audio/67.mp4 ->/data/media/"
,
"resource/audio/92.mp4 ->/data/media/"
,
"resource/audio/93.mp4 ->/data/media/"
,
"resource/audio/94.mp4 ->/data/media/"
,
"resource/audio/96.mp4 ->/data/media/"
,
"resource/audio/97.mp4 ->/data/media/"
,
"resource/audio/98.mp4 ->/data/media/"
"
./
resource/audio/01.mp3 ->/data/media/"
,
"
./
resource/audio/02.mp3 ->/data/media/"
,
"
./
resource/audio/03.mp3 ->/data/media/"
,
"
./
resource/audio/04.mp3 ->/data/media/"
,
"
./
resource/audio/47.mp4 ->/data/media/"
,
"
./
resource/audio/49.mp4 ->/data/media/"
,
"
./
resource/audio/50.mp4 ->/data/media/"
,
"
./
resource/audio/51.mp4 ->/data/media/"
,
"
./
resource/audio/54.mp4 ->/data/media/"
,
"
./
resource/audio/55.m4a ->/data/media/"
,
"
./
resource/audio/57.m4a ->/data/media/"
,
"
./
resource/audio/58.m4a ->/data/media/"
,
"
./
resource/audio/59.m4a ->/data/media/"
,
"
./
resource/audio/62.m4a ->/data/media/"
,
"
./
resource/audio/64.mp4 ->/data/media/"
,
"
./
resource/audio/65.mp4 ->/data/media/"
,
"
./
resource/audio/66.mp4 ->/data/media/"
,
"
./
resource/audio/67.mp4 ->/data/media/"
,
"
./
resource/audio/92.mp4 ->/data/media/"
,
"
./
resource/audio/93.mp4 ->/data/media/"
,
"
./
resource/audio/94.mp4 ->/data/media/"
,
"
./
resource/audio/96.mp4 ->/data/media/"
,
"
./
resource/audio/97.mp4 ->/data/media/"
,
"
./
resource/audio/98.mp4 ->/data/media/"
]
},
{
"test-file-name"
:
[
"AudioPlayerJsTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
...
...
@@ -54,6 +47,13 @@
"teardown-command"
:[
"setenforce 1"
]
},
{
"test-file-name"
:
[
"AudioPlayerJsTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
multimedia/audio/audio_js_standard/audioPlayer/src/main/config.json
浏览文件 @
5c7ee5ee
{
"app"
:
{
"bundleName"
:
"ohos.acts.multimedia.audio.audioplayer"
,
"apiVersion"
:
{
"compatible"
:
6
,
"releaseType"
:
"Beta1"
,
"target"
:
7
},
"vendor"
:
"acts"
,
"bundleName"
:
"ohos.acts.multimedia.audio.audioplayer"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
"code"
:
1000000
,
"name"
:
"1.0.0"
}
},
"apiVersion
"
:
{
"
compatible"
:
6
,
"target"
:
5
"deviceConfig
"
:
{
"
default"
:
{
"debug"
:
true
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"ohos.acts.multimedia.audio.audioplayer"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"iconId"
:
16777218
,
"skills"
:
[
{
"entities"
:
[
...
...
@@ -35,15 +31,33 @@
]
}
],
"descriptionId"
:
16777217
,
"visible"
:
true
,
"name"
:
"ohos.acts.multimedia.audio.audioplayer.MainAbility"
,
"labelId"
:
16777216
,
"icon"
:
"$media:icon"
,
"name"
:
"ohos.acts.multimedia.audio.audioplayer.MainAbility"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"homeAbility"
:
true
,
"launchType"
:
"standard"
}
],
"deviceType"
:
[
"phone"
,
"tablet"
,
"tv"
,
"wearable"
],
"mainAbility"
:
"ohos.acts.multimedia.audio.audioplayer.MainAbility"
,
"distro"
:
{
"moduleType"
:
"entry"
,
"installationFree"
:
false
,
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
},
"package"
:
"ohos.acts.multimedia.audio.audioplayer"
,
"name"
:
".MyApplication"
,
"js"
:
[
{
"pages"
:
[
...
...
multimedia/audio/audio_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
0 → 100644
浏览文件 @
5c7ee5ee
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.audio.audioplayer
;
import
ohos.ace.ability.AceAbility
;
import
ohos.aafwk.content.Intent
;
/*
* java MainAbility
*/
public
class
MainAbility
extends
AceAbility
{
@Override
public
void
onStart
(
Intent
intent
)
{
super
.
onStart
(
intent
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
}
}
multimedia/audio/audio_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
0 → 100644
浏览文件 @
5c7ee5ee
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.audio.audioplayer
;
import
ohos.aafwk.ability.AbilityPackage
;
/*
* java MyApplication
*/
public
class
MyApplication
extends
AbilityPackage
{
@Override
public
void
onInitialize
()
{
super
.
onInitialize
();
}
}
multimedia/audio/audio_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
浏览文件 @
5c7ee5ee
...
...
@@ -74,9 +74,10 @@ describe('PlayerLocalTestAudioFUNC', function () {
}
}
function
nextStep
(
mySteps
)
{
function
nextStep
(
mySteps
,
done
)
{
if
(
mySteps
[
0
]
==
END_STATE
)
{
isTimeOut
=
true
;
done
();
console
.
info
(
'
case to done
'
);
return
;
}
switch
(
mySteps
[
0
])
{
...
...
@@ -125,18 +126,16 @@ describe('PlayerLocalTestAudioFUNC', function () {
}
}
function
setSrcCallback
(
mySteps
)
{
function
setCallback
(
mySteps
,
done
)
{
console
.
info
(
`case setCallback`
);
audioPlayer
.
on
(
'
dataLoad
'
,
()
=>
{
mySteps
.
shift
();
console
.
info
(
`case dataLoad called`
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setPlayCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
play
'
,
()
=>
{
mySteps
.
shift
();
console
.
info
(
`case play called`
);
...
...
@@ -148,31 +147,22 @@ describe('PlayerLocalTestAudioFUNC', function () {
return
;
}
expect
(
audioPlayer
.
state
).
assertEqual
(
'
playing
'
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setPauseCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
pause
'
,
()
=>
{
mySteps
.
shift
();
console
.
info
(
`case pause called`
);
console
.
info
(
`case pause currentTime is
${
audioPlayer
.
currentTime
}
`
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setResetCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
reset
'
,
()
=>
{
mySteps
.
shift
();
console
.
info
(
`case reset called`
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setStopCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
stop
'
,
()
=>
{
if
(
mySteps
[
0
]
==
RESET_STATE
)
{
console
.
info
(
`case reset stop called`
);
...
...
@@ -183,11 +173,8 @@ describe('PlayerLocalTestAudioFUNC', function () {
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
stopped
'
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setSeekCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
timeUpdate
'
,
(
seekDoneTime
)
=>
{
if
(
typeof
(
seekDoneTime
)
==
'
undefined
'
)
{
console
.
info
(
`case seek filed,errcode is
${
seekDoneTime
}
`
);
...
...
@@ -207,12 +194,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
sleep
(
PLAY_STATE
);
}
if
((
seekDoneTime
<
audioPlayer
.
duration
)
||
(
audioPlayer
.
state
==
'
paused
'
))
{
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
}
});
}
function
setVolumeCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
volumeChange
'
,
()
=>
{
console
.
info
(
`case setvolume called`
);
mySteps
.
shift
();
...
...
@@ -220,21 +204,15 @@ describe('PlayerLocalTestAudioFUNC', function () {
if
(
audioPlayer
.
state
==
'
playing
'
)
{
sleep
(
PLAY_TIME
);
}
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setFinishCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
finish
'
,
()
=>
{
mySteps
.
shift
();
expect
(
audioPlayer
.
state
).
assertEqual
(
'
stopped
'
);
expect
(
audioPlayer
.
currentTime
).
assertClose
(
audioPlayer
.
duration
,
DELTA_TIME
);
console
.
info
(
`case finish called`
);
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setErrorCallback
(
mySteps
)
{
audioPlayer
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
info
(
`case error called,errName is
${
err
.
name
}
`
);
console
.
info
(
`case error called,errCode is
${
err
.
code
}
`
);
...
...
@@ -247,28 +225,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
mySteps
.
shift
();
mySteps
.
shift
();
}
nextStep
(
mySteps
);
nextStep
(
mySteps
,
done
);
});
}
function
setCallback
(
mySteps
,
done
)
{
console
.
info
(
`case setCallback`
);
setSrcCallback
(
mySteps
);
setPlayCallback
(
mySteps
);
setPauseCallback
(
mySteps
);
setResetCallback
(
mySteps
);
setStopCallback
(
mySteps
);
setSeekCallback
(
mySteps
);
setVolumeCallback
(
mySteps
);
setFinishCallback
(
mySteps
);
setErrorCallback
(
mySteps
);
setTimeout
(
function
()
{
if
(
!
isTimeOut
)
{
console
.
info
(
`case is time out!`
);
expect
().
assertFail
();
}
done
();
},
TIME_OUT
);
};
/* *
...
...
@@ -279,7 +238,9 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`case update`
);
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
...
...
@@ -294,6 +255,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -309,6 +271,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -324,6 +287,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -339,6 +303,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -354,6 +319,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0700
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
STOP_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -369,6 +335,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
STOP_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -384,6 +351,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_0900
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
RESET_STATE
,
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -400,6 +368,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1000
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
STOP_STATE
,
RESET_STATE
,
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -416,6 +385,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
RESET_STATE
,
SRC_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -432,6 +402,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -447,6 +418,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
PAUSE_STATE
,
ERROR_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -462,6 +434,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
PAUSE_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -477,6 +450,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
DURATION_TIME
,
PLAY_STATE
,
FINISH_STATE
,
END_STATE
);
...
...
@@ -493,6 +467,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
PAUSE_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -508,6 +483,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1700
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -523,6 +499,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
STOP_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -538,6 +515,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_1900
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
SEEK_STATE
,
0
,
ERROR_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -553,6 +531,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2000
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
0
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -568,6 +547,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
DURATION_TIME
/
RAND_NUM
,
STOP_STATE
,
END_STATE
);
...
...
@@ -584,6 +564,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -599,6 +580,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
STOP_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -614,6 +596,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
SEEK_STATE
,
0
,
ERROR_STATE
,
RESET_STATE
,
SRC_STATE
,
PLAY_STATE
,
END_STATE
);
...
...
@@ -630,6 +613,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
0
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -645,6 +629,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level 3
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
SEEK_STATE
,
SEEK_TIME
,
ERROR_STATE
,
PAUSE_STATE
,
ERROR_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -661,6 +646,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level 3
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2700
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
STOP_STATE
,
SEEK_STATE
,
SEEK_TIME
,
ERROR_STATE
,
RESET_STATE
,
SRC_STATE
,
PLAY_STATE
,
END_STATE
);
...
...
@@ -677,6 +663,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
DURATION_TIME
,
FINISH_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -692,6 +679,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level 3
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_2900
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
DURATION_TIME
+
DELTA_TIME
,
FINISH_STATE
,
END_STATE
);
...
...
@@ -708,6 +696,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3000
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
DURATION_TIME
/
RAND_NUM
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -723,6 +712,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
0
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -738,6 +728,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
DURATION_TIME
,
PLAY_STATE
,
FINISH_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -754,6 +745,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level 3
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
SEEK_STATE
,
DURATION_TIME
+
DELTA_TIME
,
PLAY_STATE
,
FINISH_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -770,6 +762,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level 3
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
SEEK_STATE
,
DURATION_TIME
+
DELTA_TIME
,
FINISH_STATE
,
PLAY_STATE
,
RESET_STATE
,
END_STATE
);
...
...
@@ -786,6 +779,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3600
'
,
0
,
async
function
(
done
)
{
let
playCount
=
0
;
let
seekCount
=
0
;
...
...
@@ -852,6 +846,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_AUDIO_Function_04_3700
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
VOLUME_STATE
,
0
,
VOLUME_STATE
,
MAX_VOLUME
,
RESET_STATE
,
END_STATE
);
...
...
multimedia/audio/audio_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
浏览文件 @
5c7ee5ee
...
...
@@ -45,16 +45,15 @@ describe('PlayerLocalTestAudioFormat', function () {
for
(
let
t
=
Date
.
now
();
Date
.
now
()
-
t
<=
time
;);
}
function
setSrcCallback
(
audioPlayer
)
{
function
playSource
(
audioSource
,
done
)
{
let
audioPlayer
=
media
.
createAudioPlayer
();
audioPlayer
.
src
=
audioSource
;
audioPlayer
.
on
(
'
dataLoad
'
,
()
=>
{
console
.
info
(
'
case set source success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
audioPlayer
.
play
();
});
}
function
setPlayCallback
(
audioPlayer
)
{
audioPlayer
.
on
(
'
play
'
,
()
=>
{
console
.
info
(
'
case start to play
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
playing
'
);
...
...
@@ -65,17 +64,16 @@ describe('PlayerLocalTestAudioFormat', function () {
audioPlayer
.
seek
(
SEEK_TIME
);
}
});
}
function
setPauseCallback
(
audioPlayer
)
{
audioPlayer
.
on
(
'
pause
'
,
()
=>
{
console
.
info
(
'
case now is paused
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
paused
'
);
audioPlayer
.
setVolume
(
MAX_VOLUME
);
});
}
function
setResetCallback
(
audioPlayer
,
done
)
{
audioPlayer
.
on
(
'
stop
'
,
()
=>
{
console
.
info
(
'
case stop success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
stopped
'
);
audioPlayer
.
reset
();
});
audioPlayer
.
on
(
'
reset
'
,
()
=>
{
console
.
info
(
'
case reset success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
...
...
@@ -83,17 +81,6 @@ describe('PlayerLocalTestAudioFormat', function () {
audioPlayer
=
undefined
;
done
();
});
}
function
setStopCallback
(
audioPlayer
)
{
audioPlayer
.
on
(
'
stop
'
,
()
=>
{
console
.
info
(
'
case stop success
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
stopped
'
);
audioPlayer
.
reset
();
});
}
function
setSeekCallback
(
audioPlayer
,
done
)
{
audioPlayer
.
on
(
'
timeUpdate
'
,
(
seekDoneTime
)
=>
{
if
(
typeof
(
seekDoneTime
)
==
"
undefined
"
)
{
console
.
info
(
`case seek filed,errcode is
${
seekDoneTime
}
`
);
...
...
@@ -112,25 +99,16 @@ describe('PlayerLocalTestAudioFormat', function () {
expect
(
audioPlayer
.
duration
).
assertEqual
(
seekDoneTime
);
}
});
}
function
setVolumeCallback
(
audioPlayer
)
{
audioPlayer
.
on
(
'
volumeChange
'
,
()
=>
{
console
.
info
(
'
case set volume value to
'
+
MAX_VOLUME
);
audioPlayer
.
play
();
isToSeek
=
true
;
});
}
function
setFinishCallback
(
audioPlayer
)
{
audioPlayer
.
on
(
'
finish
'
,
()
=>
{
console
.
info
(
'
case play end
'
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
stopped
'
);
audioPlayer
.
stop
();
});
}
function
setErrorCallback
(
audioPlayer
,
done
)
{
audioPlayer
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
info
(
`case error called,errName is
${
err
.
name
}
`
);
console
.
info
(
`case error called,errCode is
${
err
.
code
}
`
);
...
...
@@ -141,26 +119,6 @@ describe('PlayerLocalTestAudioFormat', function () {
});
}
function
playSource
(
audioSource
,
done
)
{
let
audioPlayer
=
media
.
createAudioPlayer
();
if
(
typeof
(
audioPlayer
)
==
'
undefined
'
)
{
console
.
info
(
'
case create player is faild
'
);
expect
().
assertFail
();
done
();
return
;
}
setSrcCallback
(
audioPlayer
);
setPlayCallback
(
audioPlayer
);
setPauseCallback
(
audioPlayer
);
setResetCallback
(
audioPlayer
,
done
);
setStopCallback
(
audioPlayer
);
setSeekCallback
(
audioPlayer
,
done
);
setVolumeCallback
(
audioPlayer
);
setFinishCallback
(
audioPlayer
);
setErrorCallback
(
audioPlayer
,
done
);
audioPlayer
.
src
=
audioSource
;
}
/* *
* @tc.number : SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100
* @tc.name : 001.Playing mp3 streams
...
...
@@ -173,6 +131,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
01.mp3
'
,
done
);
})
...
...
@@ -189,6 +148,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0200
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
02.mp3
'
,
done
);
})
...
...
@@ -205,6 +165,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
03.mp3
'
,
done
);
})
...
...
@@ -221,6 +182,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP3_01_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
04.mp3
'
,
done
);
})
...
...
@@ -237,6 +199,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
47.mp4
'
,
done
);
})
...
...
@@ -254,6 +217,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
49.mp4
'
,
done
);
})
...
...
@@ -270,6 +234,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
50.mp4
'
,
done
);
})
...
...
@@ -286,6 +251,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
51.mp4
'
,
done
);
})
...
...
@@ -302,6 +268,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0600
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
54.mp4
'
,
done
);
})
...
...
@@ -318,6 +285,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0700
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
64.mp4
'
,
done
);
})
...
...
@@ -334,6 +302,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0800
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
65.mp4
'
,
done
);
})
...
...
@@ -350,6 +319,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_0900
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
66.mp4
'
,
done
);
})
...
...
@@ -366,6 +336,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1000
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
67.mp4
'
,
done
);
})
...
...
@@ -382,6 +353,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
92.mp4
'
,
done
);
})
...
...
@@ -398,6 +370,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1200
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
93.mp4
'
,
done
);
})
...
...
@@ -414,6 +387,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
94.mp4
'
,
done
);
})
...
...
@@ -430,6 +404,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
96.mp4
'
,
done
);
})
...
...
@@ -446,6 +421,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
97.mp4
'
,
done
);
})
...
...
@@ -462,6 +438,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_MP4_01_1600
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
98.mp4
'
,
done
);
})
...
...
@@ -478,6 +455,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
55.m4a
'
,
done
);
})
...
...
@@ -495,6 +473,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
57.m4a
'
,
done
);
})
...
...
@@ -511,6 +490,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
58.m4a
'
,
done
);
})
...
...
@@ -527,6 +507,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
59.m4a
'
,
done
);
})
...
...
@@ -543,6 +524,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.type : Function test
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_Format_M4A_01_0700
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
62.m4a
'
,
done
);
})
...
...
multimedia/audio/audio_js_standard/audioPlayer_API/Test.json
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/config.json
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/java/ohos/acts/multimedia/audio/audioplayerapi/MainAbility.java
0 → 100644
浏览文件 @
5c7ee5ee
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package
ohos.acts.multimedia.audio.audioplayerapi
;
import
ohos.ace.ability.AceAbility
;
import
ohos.aafwk.content.Intent
;
/*
* java MainAbility
*/
public
class
MainAbility
extends
AceAbility
{
@Override
public
void
onStart
(
Intent
intent
)
{
super
.
onStart
(
intent
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
}
}
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/java/ohos/acts/multimedia/audio/audioplayerapi/MyApplication.java
0 → 100644
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioPlayer_API/src/main/js/test/PlayerLocalTestAudioAPI.test.js
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/Test.json
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/src/main/config.json
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
0 → 100644
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
0 → 100644
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioAPI.test.js
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
multimedia/audio/audio_js_standard/audioRecorder/src/main/js/test/RecorderLocalTestAudioFUNC.test.js
浏览文件 @
5c7ee5ee
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录