Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4d559dad
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看板
提交
4d559dad
编写于
6月 17, 2022
作者:
F
fulizhong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify videoPlayer and audioPlayer testcases Signed-off-by: FULIZHONG<fulizhong1@huawei.com>
Signed-off-by:
N
fulizhong
<
fulizhong@huawei.com
>
上级
a7490811
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
110 addition
and
197 deletion
+110
-197
multimedia/media/media_js_standard/audioPlayer/Test.json
multimedia/media/media_js_standard/audioPlayer/Test.json
+24
-24
multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
...a/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
+0
-35
multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
...ohos/acts/multimedia/audio/audioplayer/MyApplication.java
+0
-29
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
...ioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
+10
-4
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
...oPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
+10
-3
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
...layer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
+33
-27
multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
...a/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
+0
-35
multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
...ohos/acts/multimedia/audio/audioplayer/MyApplication.java
+0
-29
multimedia/media/media_js_standard/videoPlayer/Test.json
multimedia/media/media_js_standard/videoPlayer/Test.json
+1
-1
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
...layer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
+10
-3
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
...ayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
+11
-3
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
...layer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
+11
-4
未找到文件。
multimedia/media/media_js_standard/audioPlayer/Test.json
浏览文件 @
4d559dad
...
...
@@ -19,30 +19,30 @@
"pre-push"
:
[
],
"push"
:
[
"./resource/audio/01.mp3 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/02.mp3 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/03.mp3 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/04.mp3 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/47.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/49.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/50.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/51.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/54.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/55.m4a ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/57.m4a ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/58.m4a ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/59.m4a ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/62.m4a ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/64.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/65.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/66.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/67.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/92.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/93.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/94.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/96.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/97.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
,
"./resource/audio/98.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer
/"
"./resource/audio/01.mp3 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/02.mp3 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/03.mp3 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/04.mp3 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/47.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/49.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/50.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/51.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/54.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/55.m4a ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/57.m4a ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/58.m4a ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/59.m4a ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/62.m4a ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/64.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/65.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/66.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/67.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/92.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/93.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/94.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/96.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/97.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
,
"./resource/audio/98.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.audio.audioplayer/haps/entry/files
/"
]
},
{
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
已删除
100644 → 0
浏览文件 @
a7490811
/*
* Copyright (C) 2022 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/media/media_js_standard/audioPlayer/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
已删除
100644 → 0
浏览文件 @
a7490811
/*
* Copyright (C) 2022 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/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
浏览文件 @
4d559dad
...
...
@@ -15,13 +15,14 @@
import
media
from
'
@ohos.multimedia.media
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
PlayerLocalTestAudioAPI
'
,
function
()
{
let
audioPlayer
=
media
.
createAudioPlayer
();
let
loopValue
=
false
;
let
isTimeOut
=
false
;
const
AUDIO_SOURCE
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer/
01.mp3
'
;
const
AUDIO_SOURCE
=
'
01.mp3
'
;
const
PLAY_TIME
=
3000
;
const
END_STATE
=
0
;
const
SRC_STATE
=
1
;
...
...
@@ -39,11 +40,11 @@ describe('PlayerLocalTestAudioAPI', function () {
const
SEEK_TIME
=
5000
;
const
DELTA_TIME
=
1000
;
const
SECOND_INDEX
=
1
;
const
TIME_OUT
=
20000
;
const
VOLUME_VALUE
=
0.5
;
let
fdPath
;
let
fdValue
;
let
context
=
featureAbility
.
getContext
();
let
audioPath
=
''
;
beforeAll
(
async
function
()
{
await
getFd
();
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -68,8 +69,13 @@ describe('PlayerLocalTestAudioAPI', function () {
}
async
function
getFd
()
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
audioPath
=
data
+
'
/
'
+
AUDIO_SOURCE
;
console
.
info
(
"
case audioPath is
"
+
audioPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
AUDIO_SOURCE
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
audioPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
浏览文件 @
4d559dad
...
...
@@ -15,12 +15,13 @@
import
media
from
'
@ohos.multimedia.media
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
PlayerLocalTestAudioFUNC
'
,
function
()
{
let
audioPlayer
=
media
.
createAudioPlayer
();
let
isTimeOut
=
false
;
const
AUDIO_SOURCE
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer/
01.mp3
'
;
const
AUDIO_SOURCE
=
'
01.mp3
'
;
const
PLAY_TIME
=
3000
;
const
DURATION_TIME
=
219600
;
const
SEEK_TIME
=
5000
;
...
...
@@ -43,7 +44,8 @@ describe('PlayerLocalTestAudioFUNC', function () {
const
MAX_VOLUME
=
1
;
let
fdPath
;
let
fdValue
;
let
context
=
featureAbility
.
getContext
();
let
audioPath
=
''
;
beforeAll
(
async
function
()
{
await
getFd
();
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -68,8 +70,13 @@ describe('PlayerLocalTestAudioFUNC', function () {
}
async
function
getFd
()
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
audioPath
=
data
+
'
/
'
+
AUDIO_SOURCE
;
console
.
info
(
"
case audioPath is
"
+
audioPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
AUDIO_SOURCE
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
audioPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFormat.test.js
浏览文件 @
4d559dad
...
...
@@ -15,10 +15,10 @@
import
media
from
'
@ohos.multimedia.media
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
PlayerLocalTestAudioFormat
'
,
function
()
{
const
BASIC_PATH
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioplayer/
'
;
const
MAX_VOLUME
=
1
;
const
PLAY_TIME
=
3000
;
const
SEEK_TIME
=
10000
;
// 10s
...
...
@@ -26,7 +26,7 @@ describe('PlayerLocalTestAudioFormat', function () {
let
isToDuration
=
false
;
let
fdPath
;
let
fdValue
;
let
context
=
featureAbility
.
getContext
();
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
})
...
...
@@ -51,8 +51,14 @@ describe('PlayerLocalTestAudioFormat', function () {
}
async
function
getFd
(
pathName
)
{
let
audioPath
=
''
;
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
audioPath
=
data
+
'
/
'
+
pathName
;
console
.
info
(
"
case audioPath is
"
+
audioPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
pathName
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
audioPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
@@ -151,7 +157,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP3_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
01.mp3
'
,
done
);
playSource
(
'
01.mp3
'
,
done
);
})
/* *
...
...
@@ -167,7 +173,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP3_0200
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
02.mp3
'
,
done
);
playSource
(
'
02.mp3
'
,
done
);
})
/* *
...
...
@@ -183,7 +189,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP3_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
03.mp3
'
,
done
);
playSource
(
'
03.mp3
'
,
done
);
})
/* *
...
...
@@ -199,7 +205,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP3_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
04.mp3
'
,
done
);
playSource
(
'
04.mp3
'
,
done
);
})
/* *
...
...
@@ -215,7 +221,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
47.mp4
'
,
done
);
playSource
(
'
47.mp4
'
,
done
);
})
...
...
@@ -232,7 +238,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
49.mp4
'
,
done
);
playSource
(
'
49.mp4
'
,
done
);
})
/* *
...
...
@@ -248,7 +254,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
50.mp4
'
,
done
);
playSource
(
'
50.mp4
'
,
done
);
})
/* *
...
...
@@ -264,7 +270,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
51.mp4
'
,
done
);
playSource
(
'
51.mp4
'
,
done
);
})
/* *
...
...
@@ -280,7 +286,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0600
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
54.mp4
'
,
done
);
playSource
(
'
54.mp4
'
,
done
);
})
/* *
...
...
@@ -296,7 +302,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0700
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
64.mp4
'
,
done
);
playSource
(
'
64.mp4
'
,
done
);
})
/* *
...
...
@@ -312,7 +318,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0800
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
65.mp4
'
,
done
);
playSource
(
'
65.mp4
'
,
done
);
})
/* *
...
...
@@ -328,7 +334,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_0900
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
66.mp4
'
,
done
);
playSource
(
'
66.mp4
'
,
done
);
})
/* *
...
...
@@ -344,7 +350,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1000
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
67.mp4
'
,
done
);
playSource
(
'
67.mp4
'
,
done
);
})
/* *
...
...
@@ -360,7 +366,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
92.mp4
'
,
done
);
playSource
(
'
92.mp4
'
,
done
);
})
/* *
...
...
@@ -376,7 +382,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1200
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
93.mp4
'
,
done
);
playSource
(
'
93.mp4
'
,
done
);
})
/* *
...
...
@@ -392,7 +398,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
94.mp4
'
,
done
);
playSource
(
'
94.mp4
'
,
done
);
})
/* *
...
...
@@ -408,7 +414,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
96.mp4
'
,
done
);
playSource
(
'
96.mp4
'
,
done
);
})
/* *
...
...
@@ -424,7 +430,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
97.mp4
'
,
done
);
playSource
(
'
97.mp4
'
,
done
);
})
/* *
...
...
@@ -440,7 +446,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_MP4_1600
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
98.mp4
'
,
done
);
playSource
(
'
98.mp4
'
,
done
);
})
/* *
...
...
@@ -456,7 +462,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_M4A_0100
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
55.m4a
'
,
done
);
playSource
(
'
55.m4a
'
,
done
);
})
...
...
@@ -473,7 +479,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_M4A_0300
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
57.m4a
'
,
done
);
playSource
(
'
57.m4a
'
,
done
);
})
/* *
...
...
@@ -489,7 +495,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_M4A_0400
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
58.m4a
'
,
done
);
playSource
(
'
58.m4a
'
,
done
);
})
/* *
...
...
@@ -505,7 +511,7 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_M4A_0500
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
59.m4a
'
,
done
);
playSource
(
'
59.m4a
'
,
done
);
})
/* *
...
...
@@ -521,6 +527,6 @@ describe('PlayerLocalTestAudioFormat', function () {
* @tc.level : Level0
*/
it
(
'
SUB_MEDIA_PLAYER_LOCAL_FORMAT_M4A_0700
'
,
0
,
async
function
(
done
)
{
playSource
(
BASIC_PATH
+
'
62.m4a
'
,
done
);
playSource
(
'
62.m4a
'
,
done
);
})
})
multimedia/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MainAbility.java
已删除
100644 → 0
浏览文件 @
a7490811
/*
* Copyright (C) 2022 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/media/media_js_standard/audioRecorder/src/main/java/ohos/acts/multimedia/audio/audioplayer/MyApplication.java
已删除
100644 → 0
浏览文件 @
a7490811
/*
* Copyright (C) 2022 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/media/media_js_standard/videoPlayer/Test.json
浏览文件 @
4d559dad
...
...
@@ -19,7 +19,7 @@
"pre-push"
:
[
],
"push"
:
[
"./resource/audio/H264_AAC.mp4 ->/data/a
ccounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer
/"
"./resource/audio/H264_AAC.mp4 ->/data/a
pp/el2/100/base/ohos.acts.multimedia.video.videoplayer/haps/entry/files
/"
]
},
{
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
浏览文件 @
4d559dad
...
...
@@ -16,13 +16,13 @@
import
media
from
'
@ohos.multimedia.media
'
import
router
from
'
@system.router
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
VideoPlayerAPICallbackTest
'
,
function
()
{
const
AUDIO_SOURCE
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/
H264_AAC.mp4
'
;
const
VIDEO_SOURCE
=
'
H264_AAC.mp4
'
;
const
PLAY_TIME
=
1000
;
const
SEEK_TIME
=
5000
;
const
SEEK_CLOSEST
=
3
;
const
WIDTH_VALUE
=
720
;
const
HEIGHT_VALUE
=
480
;
const
DURATION_TIME
=
10034
;
...
...
@@ -51,6 +51,8 @@ describe('VideoPlayerAPICallbackTest', function () {
let
temp
=
0
;
let
events
=
require
(
'
events
'
);
let
eventEmitter
=
new
events
.
EventEmitter
();
let
context
=
featureAbility
.
getContext
();
let
videoPath
=
''
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -90,8 +92,13 @@ describe('VideoPlayerAPICallbackTest', function () {
}
async
function
getFd
()
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
videoPath
=
data
+
'
/
'
+
VIDEO_SOURCE
;
console
.
info
(
"
case audioPath is
"
+
videoPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
AUDIO_SOURCE
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
videoPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
浏览文件 @
4d559dad
...
...
@@ -16,10 +16,11 @@
import
media
from
'
@ohos.multimedia.media
'
import
router
from
'
@system.router
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
VideoPlayerFuncCallbackTest
'
,
function
()
{
const
AUDIO_SOURCE
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/
H264_AAC.mp4
'
;
const
VIDEO_SOURCE
=
'
H264_AAC.mp4
'
;
const
PLAY_TIME
=
3000
;
const
SEEK_TIME
=
5000
;
const
WIDTH_VALUE
=
720
;
...
...
@@ -51,6 +52,8 @@ describe('VideoPlayerFuncCallbackTest', function () {
let
temp
=
0
;
let
events
=
require
(
'
events
'
);
let
eventEmitter
=
new
events
.
EventEmitter
();
let
context
=
featureAbility
.
getContext
();
let
videoPath
=
''
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -99,7 +102,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
path
=
'
pages/surfaceTest/surfaceTest
'
;
temp
=
1
;
}
else
{
path
=
'
pages/surfaceTest/surfaceTest2
'
;
path
=
'
pages/surfaceTest
2
/surfaceTest2
'
;
temp
=
0
;
}
let
options
=
{
...
...
@@ -113,8 +116,13 @@ describe('VideoPlayerFuncCallbackTest', function () {
}
async
function
getFd
()
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
videoPath
=
data
+
'
/
'
+
VIDEO_SOURCE
;
console
.
info
(
"
case audioPath is
"
+
videoPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
AUDIO_SOURCE
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
videoPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
浏览文件 @
4d559dad
...
...
@@ -16,13 +16,13 @@
import
media
from
'
@ohos.multimedia.media
'
import
router
from
'
@system.router
'
import
fileIO
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
VideoPlayerFuncPromiseTest
'
,
function
()
{
const
AUDIO_SOURCE
=
'
/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoplayer/
H264_AAC.mp4
'
;
const
VIDEO_SOURCE
=
'
H264_AAC.mp4
'
;
const
PLAY_TIME
=
3000
;
const
SEEK_TIME
=
5000
;
const
SEEK_CLOSEST
=
3
;
const
WIDTH_VALUE
=
720
;
const
HEIGHT_VALUE
=
480
;
const
DURATION_TIME
=
10034
;
...
...
@@ -33,6 +33,8 @@ describe('VideoPlayerFuncPromiseTest', function () {
let
fdPath
;
let
fdValue
;
let
temp
=
0
;
let
context
=
featureAbility
.
getContext
();
let
videoPath
=
''
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
})
...
...
@@ -80,7 +82,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
path
=
'
pages/surfaceTest/surfaceTest
'
;
temp
=
1
;
}
else
{
path
=
'
pages/surfaceTest/surfaceTest2
'
;
path
=
'
pages/surfaceTest
2
/surfaceTest2
'
;
temp
=
0
;
}
let
options
=
{
...
...
@@ -94,8 +96,13 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
async
function
getFd
()
{
await
context
.
getFilesDir
().
then
((
data
)
=>
{
console
.
info
(
"
case file path is
"
+
JSON
.
stringify
(
data
));
videoPath
=
data
+
'
/
'
+
VIDEO_SOURCE
;
console
.
info
(
"
case audioPath is
"
+
videoPath
);
});
fdPath
=
'
fd://
'
;
await
fileIO
.
open
(
AUDIO_SOURCE
).
then
((
fdNumber
)
=>
{
await
fileIO
.
open
(
videoPath
).
then
((
fdNumber
)
=>
{
fdPath
=
fdPath
+
''
+
fdNumber
;
fdValue
=
fdNumber
;
console
.
info
(
'
[fileIO]case open fd success,fdPath is
'
+
fdPath
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录