Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
fc947786
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看板
未验证
提交
fc947786
编写于
2月 20, 2023
作者:
N
Nicklaus
提交者:
Gitee
2月 20, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update multimedia/media/media_js_standard/AVPlayerTestBase.js.
Signed-off-by:
N
Nicklaus
<
dongwei@kaihong.com
>
上级
75cfb6f8
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
11 addition
and
15 deletion
+11
-15
multimedia/media/media_js_standard/AVPlayerTestBase.js
multimedia/media/media_js_standard/AVPlayerTestBase.js
+11
-15
未找到文件。
multimedia/media/media_js_standard/AVPlayerTestBase.js
浏览文件 @
fc947786
...
@@ -472,15 +472,13 @@ export async function avPlayerWithCallBack(src, avPlayer, playTest, playTime, do
...
@@ -472,15 +472,13 @@ export async function avPlayerWithCallBack(src, avPlayer, playTest, playTime, do
setSource
(
avPlayer
,
src
);
setSource
(
avPlayer
,
src
);
}
}
export
async
function
playToPauseLoop
(
avPlayer
,
prepared
){
async
function
playToPauseLoop
(
avPlayer
){
if
(
prepared
==
1
){
await
avPlayer
.
play
().
then
(()
=>
{
await
avPlayer
.
play
().
then
(()
=>
{
console
.
info
(
'
playToPauseLoop play success
'
);
console
.
info
(
'
playToPauseLoop play success
'
);
expect
(
avPlayer
.
state
).
assertEqual
(
AV_PLAYER_STATE
.
PLAYING
);
expect
(
avPlayer
.
state
).
assertEqual
(
AV_PLAYER_STATE
.
PLAYING
);
},
(
err
)
=>
{
},
(
err
)
=>
{
console
.
error
(
'
playToPauseLoop play filed,error message is :
'
+
err
.
message
)
console
.
error
(
'
playToPauseLoop play filed,error message is :
'
+
err
.
message
)
})
})
}
if
(
avPlayer
.
state
==
AV_PLAYER_STATE
.
PLAYING
){
if
(
avPlayer
.
state
==
AV_PLAYER_STATE
.
PLAYING
){
avPlayer
.
loop
=
true
;
avPlayer
.
loop
=
true
;
await
mediaTestBase
.
msleepAsync
(
2
);
await
mediaTestBase
.
msleepAsync
(
2
);
...
@@ -496,7 +494,6 @@ export async function playToPauseLoop(avPlayer,prepared){
...
@@ -496,7 +494,6 @@ export async function playToPauseLoop(avPlayer,prepared){
export
async
function
avPlayerWithoutCallBack
(
src
,
avPlayer
,
playTest
,
done
)
{
export
async
function
avPlayerWithoutCallBack
(
src
,
avPlayer
,
playTest
,
done
)
{
let
surfaceID
=
globalThis
.
value
;
let
surfaceID
=
globalThis
.
value
;
let
prepared
=
0
;
console
.
info
(
`case avPlayerWithoutCallBack in, surfaceID is
${
surfaceID
}
`
);
console
.
info
(
`case avPlayerWithoutCallBack in, surfaceID is
${
surfaceID
}
`
);
console
.
info
(
`case media source:
${
src
}
`
)
console
.
info
(
`case media source:
${
src
}
`
)
await
media
.
createAVPlayer
().
then
((
video
)
=>
{
await
media
.
createAVPlayer
().
then
((
video
)
=>
{
...
@@ -517,13 +514,12 @@ export async function avPlayerWithoutCallBack(src, avPlayer, playTest, done) {
...
@@ -517,13 +514,12 @@ export async function avPlayerWithoutCallBack(src, avPlayer, playTest, done) {
}
}
if
(
avPlayer
.
state
==
AV_PLAYER_STATE
.
PREPARED
){
if
(
avPlayer
.
state
==
AV_PLAYER_STATE
.
PREPARED
){
console
.
info
(
'
avPlayerWithoutCallBack avPlayer from PREPARED to play
'
)
console
.
info
(
'
avPlayerWithoutCallBack avPlayer from PREPARED to play
'
)
prepared
=
1
}
// play to pause loop 1000 times
// play to pause loop 1000 times
for
(
var
i
=
0
;
i
<
1000
;
i
++
){
for
(
var
i
=
0
;
i
<
1000
;
i
++
){
await
playToPauseLoop
(
avPlayer
,
prepared
)
await
playToPauseLoop
(
avPlayer
)
console
.
info
(
`case avPlayerWithoutCallBack playToPauseLoop is
${
i
}
`
);
console
.
info
(
`case avPlayerWithoutCallBack playToPauseLoop is
${
i
}
`
);
}
}
}
await
avPlayer
.
stop
().
then
(()
=>
{
await
avPlayer
.
stop
().
then
(()
=>
{
console
.
info
(
'
avPlayerWithoutCallBack avPlayer from play to stop
'
)
console
.
info
(
'
avPlayerWithoutCallBack avPlayer from play to stop
'
)
avPlayer
.
release
().
then
(()
=>
{
avPlayer
.
release
().
then
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录