Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
683efd4a
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看板
未验证
提交
683efd4a
编写于
1月 12, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 12, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7163 媒体播放用例根据资源文件修改进行相应的逻辑改动
Merge pull request !7163 from FULIZHONG/0109master
上级
4d862aad
17957a1f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
11 deletion
+12
-11
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
...ioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
+5
-3
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
...oPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
+3
-3
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
...layer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
+1
-1
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
...ayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
+1
-2
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
...layer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
+2
-2
未找到文件。
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioAPI.test.js
浏览文件 @
683efd4a
...
...
@@ -268,7 +268,7 @@ describe('PlayerLocalTestAudioAPI', function () {
it
(
'
SUB_MULTIMEDIA_MEDIA_AUDIOPLAYER_SRC_API_0200
'
,
0
,
async
function
(
done
)
{
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
fileDescriptor
.
offset
=
1
;
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY
_STATE
,
END_STATE
);
let
mySteps
=
new
Array
(
ERROR
_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
fdSrc
=
fileDescriptor
;
...
...
@@ -284,6 +284,8 @@ describe('PlayerLocalTestAudioAPI', function () {
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AUDIOPLAYER_SRC_API_0300
'
,
0
,
async
function
(
done
)
{
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
fileDescriptor
.
fd
=
fdNumber
;
fileDescriptor
.
offset
=
0
;
fileDescriptor
.
length
=
-
1
;
let
mySteps
=
new
Array
(
SRC_STATE
,
PLAY_STATE
,
PAUSE_STATE
,
PLAY_STATE
,
END_STATE
);
initAudioPlayer
();
...
...
@@ -722,9 +724,9 @@ describe('PlayerLocalTestAudioAPI', function () {
it
(
'
SUB_MULTIMEDIA_MEDIA_AUDIOPLAYER_TIME_API_0200
'
,
0
,
async
function
(
done
)
{
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
initAudioPlayer
();
audioPlayer
.
src
=
fd
Head
+
fileDescriptor
.
fd
;
audioPlayer
.
src
=
fd
Path
;
mediaTestBase
.
msleep
(
PLAY_TIME
);
expect
(
audioPlayer
.
src
).
assertEqual
(
fd
Head
+
fileDescriptor
.
fd
);
expect
(
audioPlayer
.
src
).
assertEqual
(
fd
Path
);
expect
(
audioPlayer
.
currentTime
).
assertEqual
(
0
);
expect
(
audioPlayer
.
duration
).
assertEqual
(
DURATION_TIME
);
expect
(
audioPlayer
.
state
).
assertEqual
(
'
idle
'
);
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
浏览文件 @
683efd4a
...
...
@@ -105,7 +105,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
switch
(
mySteps
[
0
])
{
case
SRC_STATE
:
console
.
info
(
`case to prepare`
);
audioPlayer
.
src
=
fd
Head
+
fileDescriptor
.
fd
;
audioPlayer
.
src
=
fd
Path
;
break
;
case
FDSRC_STATE
:
console
.
info
(
`case to prepare`
);
...
...
@@ -323,7 +323,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
DURATION_TIME
/
2
,
SEEK_STATE
,
DURATION_TIME
,
FINISH_STATE
,
RELEASE_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
src
=
fd
Head
+
fileDescriptor
.
fd
;
audioPlayer
.
src
=
fd
Path
;
})
/* *
...
...
@@ -339,7 +339,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
let
mySteps
=
new
Array
(
SRC_STATE
,
GETDESCRIPTION_PROMISE
,
GETDESCRIPTION_CALLBACK
,
RELEASE_STATE
,
END_STATE
);
initAudioPlayer
();
setCallback
(
mySteps
,
done
);
audioPlayer
.
src
=
fd
Head
+
fileDescriptor
.
fd
;
audioPlayer
.
src
=
fd
Path
;
})
/* *
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerAPICallbackTest.test.js
浏览文件 @
683efd4a
...
...
@@ -418,7 +418,7 @@ describe('VideoPlayerAPICallbackTest', function () {
fileDescriptor
.
offset
=
-
1
;
let
videoPlayer
=
null
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETFDSRC_EVENT
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PLAY_EVENT
,
PAUSE
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
PREPARE_EVENT
,
ERROR
_EVENT
,
RELEASE_EVENT
,
END_EVENT
);
eventEmitter
.
emit
(
mySteps
[
0
],
videoPlayer
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
浏览文件 @
683efd4a
...
...
@@ -605,7 +605,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
});
eventEmitter
.
on
(
'
test_setSurface
'
,
()
=>
{
videoPlayer
.
url
=
fd
Head
+
fileDescriptor
.
fd
;
videoPlayer
.
url
=
fd
Path
;
videoPlayer
.
setDisplaySurface
(
surfaceID
,
(
err
)
=>
{
if
(
err
==
null
)
{
expect
(
videoPlayer
.
state
).
assertEqual
(
'
idle
'
);
...
...
@@ -690,7 +690,6 @@ describe('VideoPlayerFuncCallbackTest', function () {
it
(
'
SUB_MULTIMEDIA_MEDIA_VIDEO_PLAYER_FUNCTION_CALLBACK_BASE_0100
'
,
0
,
async
function
(
done
)
{
mediaTestBase
.
isFileOpen
(
fileDescriptor
,
done
);
let
videoPlayer
=
null
;
let
fdPath
=
fdHead
+
fileDescriptor
.
fd
;
let
mySteps
=
new
Array
(
CREATE_EVENT
,
SETFDSOURCE_EVENT
,
fileDescriptor
,
SETSURFACE_EVENT
,
PREPARE_EVENT
,
PLAY_EVENT
,
PAUSE_EVENT
,
PLAY_EVENT
,
STOP_EVENT
,
RESET_EVENT
,
SETSOURCE_EVENT
,
fdPath
,
PREPARE_EVENT
,
SETLOOP_EVENT
,
true
,
PLAY_EVENT
,
SEEK_EVENT
,
DURATION_TIME
/
2
,
SEEK_EVENT
,
0
,
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
浏览文件 @
683efd4a
...
...
@@ -318,7 +318,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
videoPlayer
.
url
=
fd
Head
+
fileDescriptor
.
fd
;
videoPlayer
.
url
=
fd
Path
;
await
videoPlayer
.
setDisplaySurface
(
surfaceID
).
then
(()
=>
{
expect
(
videoPlayer
.
state
).
assertEqual
(
'
idle
'
);
console
.
info
(
'
case setDisplaySurface success
'
);
...
...
@@ -494,7 +494,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
}
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
videoPlayer
.
url
=
fd
Head
+
fileDescriptor
.
fd
;
videoPlayer
.
url
=
fd
Path
;
await
videoPlayer
.
setDisplaySurface
(
surfaceID
).
then
(()
=>
{
expect
(
videoPlayer
.
state
).
assertEqual
(
'
idle
'
);
console
.
info
(
'
case setDisplaySurface success
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录