Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4eb164f7
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看板
未验证
提交
4eb164f7
编写于
3月 22, 2023
作者:
O
openharmony_ci
提交者:
Gitee
3月 22, 2023
浏览文件
操作
浏览文件
下载
差异文件
!8096 【媒体子系统】新增覆盖
Merge pull request !8096 from 秦莉文/OpenHarmony-3.2-Release
上级
f4f1236a
e44c6c56
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
540 addition
and
505 deletion
+540
-505
multimedia/media/media_js_standard/AVRecorderTestBase.js
multimedia/media/media_js_standard/AVRecorderTestBase.js
+390
-0
multimedia/media/media_js_standard/MediaTestBase.js
multimedia/media/media_js_standard/MediaTestBase.js
+1
-1
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
...oPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
+2
-2
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js
...vPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js
+1
-1
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js
...yer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js
+26
-24
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/List.test.ets
...s_standard/avPlayer/entry/src/main/ets/test/List.test.ets
+1
-0
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
...rd/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
+110
-469
multimedia/media/media_js_standard/avRecorder/src/main/js/test/List.test.js
...edia_js_standard/avRecorder/src/main/js/test/List.test.js
+7
-6
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
...ayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
+1
-1
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
...layer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
+1
-1
未找到文件。
multimedia/media/media_js_standard/AVRecorderTestBase.js
0 → 100644
浏览文件 @
4eb164f7
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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.
*/
import
media
from
'
@ohos.multimedia.media
'
import
*
as
mediaTestBase
from
'
./MediaTestBase.js
'
;
export
async
function
idle
(
avRecorder
)
{
console
.
info
(
'
case createAVRecorder called
'
);
await
media
.
createAVRecorder
().
then
((
recorder
)
=>
{
if
(
recorder
!=
null
)
{
avRecorder
=
recorder
;
console
.
info
(
'
createAVRecorder success
'
);
}
else
{
console
.
info
(
'
createAVRecorder fail
'
);
}
}).
catch
((
error
)
=>
{
console
.
info
(
`createAVRecorder catchCallback, error:
${
error
}
`
);
});
return
avRecorder
;
}
export
const
AV_RECORDER_STATE
=
{
IDLE
:
'
idle
'
,
PREPARED
:
'
prepared
'
,
STARTED
:
'
started
'
,
PAUSED
:
'
paused
'
,
STOPPED
:
'
stopped
'
,
RELEASED
:
'
released
'
,
ERROR
:
'
error
'
,
}
export
function
prepareCallback
(
avRecorder
,
avConfig
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
prepare
(
avConfig
,
(
err
)
=>
{
console
.
info
(
'
case prepare called
'
+
err
);
if
(
err
==
null
)
{
console
.
info
(
'
prepare success
'
);
}
else
{
console
.
error
(
`case prepare error, errMessage is
${
err
.
message
}
`
);
}
})
}
export
function
preparePromise
(
avRecorder
,
avConfig
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
prepare
(
avConfig
).
then
(()
=>
{
console
.
info
(
'
prepare success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
getInputSurfacePromise
(
avRecorder
)
{
let
surfaceID
=
null
;
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
getInputSurface
().
then
((
surfaceId
)
=>
{
console
.
info
(
'
getInputSurface success
'
);
surfaceID
=
surfaceId
;
}).
catch
((
err
)
=>
{
console
.
info
(
'
getInputSurface failed and catch error is
'
+
err
.
message
);
});
// videoOutput = await cameraManager.createVideoOutput(videoProfiles[0], surfaceID);
}
export
function
getInputSurfaceCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
let
surfaceID
=
null
;
avRecorder
.
getInputSurface
((
err
,
surfaceId
)
=>
{
if
(
err
==
null
)
{
console
.
info
(
'
getInputSurface success
'
);
surfaceID
=
surfaceId
;
}
else
{
console
.
info
(
'
getInputSurface failed and error is
'
+
err
.
message
);
}
});
// videoOutput = await cameraManager.createVideoOutput(videoProfiles[0], surfaceID);
}
export
function
startCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
start
((
err
)
=>
{
console
.
info
(
'
case start called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
start AVRecorder success
'
);
}
else
{
console
.
info
(
'
start AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
startPromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
start
().
then
(()
=>
{
console
.
info
(
'
start success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
pauseCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
pause
((
err
)
=>
{
console
.
info
(
'
case pause called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
pause AVRecorder success
'
);
}
else
{
console
.
info
(
'
pause AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
pausePromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
pause
().
then
(()
=>
{
console
.
info
(
'
pause success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
resumeCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
resume
((
err
)
=>
{
console
.
info
(
'
case resume called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
resume AVRecorder success
'
);
}
else
{
console
.
info
(
'
resume AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
resumePromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
resume
().
then
(()
=>
{
console
.
info
(
'
resume success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
stopCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
stop
((
err
)
=>
{
console
.
info
(
'
case stop called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
stop AVRecorder success
'
);
}
else
{
console
.
info
(
'
stop AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
stopPromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
stop
().
then
(()
=>
{
console
.
info
(
'
stop success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
resetCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
reset
((
err
)
=>
{
console
.
info
(
'
case reset called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
reset AVRecorder success
'
);
}
else
{
console
.
info
(
'
reset AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
resetPromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
reset
().
then
(()
=>
{
console
.
info
(
'
reset success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
releaseCallback
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
release
((
err
)
=>
{
console
.
info
(
'
case release called
'
);
if
(
err
==
null
)
{
console
.
info
(
'
release AVRecorder success
'
);
}
else
{
console
.
info
(
'
release AVRecorder failed and error is
'
+
err
.
message
);
}
})
}
export
function
releasePromise
(
avRecorder
)
{
if
(
typeof
(
avRecorder
)
==
'
undefined
'
)
{
return
;
}
avRecorder
.
release
().
then
(()
=>
{
console
.
info
(
'
release success
'
);
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
}
export
function
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
}
export
function
offCallback
(
avRecorder
,
typeArr
)
{
if
(
avRecorder
==
null
)
{
return
;
}
for
(
let
i
=
0
;
i
<
typeArr
.
length
;
i
++
)
{
switch
(
typeArr
[
i
])
{
case
'
stateChange
'
:
avRecorder
.
off
(
'
stateChange
'
);
break
;
case
'
error
'
:
avRecorder
.
off
(
'
error
'
);
break
;
default
:
break
;
}
}
}
export
async
function
setOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
console
.
info
(
`case setOnCallback in`
);
avRecorder
.
on
(
'
stateChange
'
,
async
(
state
,
reason
)
=>
{
console
.
info
(
'
case state has changed, new state is :
'
+
state
);
switch
(
state
)
{
case
AV_RECORDER_STATE
.
IDLE
:
console
.
info
(
`case avRecorderWithCallBack is idle`
);
expect
(
avRecorder
.
state
).
assertEqual
(
"
idle
"
);
//start->stop->release
prepareCallback
(
avRecorder
,
avConfig
);
break
;
case
AV_RECORDER_STATE
.
PREPARED
:
console
.
info
(
`case avRecorderWithCallBack is prepared`
);
expect
(
avRecorder
.
state
).
assertEqual
(
'
prepared
'
);
startCallback
(
avRecorder
);
break
;
case
AV_RECORDER_STATE
.
STARTED
:
console
.
info
(
`case avRecorderWithCallBack is started`
)
expect
(
avRecorder
.
state
).
assertEqual
(
'
started
'
);
await
sleep
(
recorderTime
);
stopCallback
(
avRecorder
);
break
;
case
AV_RECORDER_STATE
.
PAUSED
:
console
.
info
(
`case avRecorderWithCallBackis paused`
)
expect
(
avRecorder
.
state
).
assertEqual
(
'
paused
'
);
break
;
case
AV_RECORDER_STATE
.
STOPPED
:
console
.
info
(
`case avRecorderWithCallBack is stopped`
)
expect
(
avRecorder
.
state
).
assertEqual
(
'
stopped
'
);
avRecorder
.
release
()
break
;
case
AV_RECORDER_STATE
.
RELEASED
:
console
.
info
(
`case avRecorderWithCallBack is released`
);
expect
(
avRecorder
.
state
).
assertEqual
(
'
released
'
);
done
();
break
;
case
AV_RECORDER_STATE
.
ERROR
:
console
.
info
(
`case avRecorderWithCallBack is error`
)
expect
(
avRecorder
.
state
).
assertEqual
(
'
error
'
);
break
;
default
:
console
.
info
(
'
case state is unknown
'
);
}
});
avRecorder
.
on
(
'
error
'
,
(
err
)
=>
{
console
.
info
(
'
case avRecorder.on(error) called, errMessage is
'
+
err
.
message
);
});
}
export
async
function
setPrepareOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
console
.
info
(
`case setOnCallback in`
);
avRecorder
.
on
(
'
stateChange
'
,
async
(
state
,
reason
)
=>
{
console
.
info
(
'
case state has changed, new state is :
'
+
state
);
switch
(
state
)
{
case
AV_RECORDER_STATE
.
PREPARED
:
console
.
info
(
`case AV_RECORDER_STATE.PREPARED`
);
expect
(
avRecorder
.
state
).
assertEqual
(
'
prepared
'
);
releaseCallback
(
avRecorder
);
break
;
case
AV_RECORDER_STATE
.
RELEASED
:
console
.
info
(
`case avRecorderReliabilitTest03 is released`
);
expect
(
avRecorder
.
state
).
assertEqual
(
'
released
'
);
done
();
break
;
case
AV_RECORDER_STATE
.
ERROR
:
console
.
info
(
`case AV_RECORDER_STATE.ERROR`
)
expect
(
avRecorder
.
state
).
assertEqual
(
'
error
'
);
break
;
default
:
console
.
info
(
'
case state is unknown
'
);
}
});
}
export
async
function
avRecorderWithCallBack
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
avRecorder
=
await
idle
(
avRecorder
)
setOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
);
await
avRecorder
.
prepare
(
avConfig
)
}
export
async
function
avRecorderReliabilitTest01
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
let
result
=
true
;
avRecorder
=
await
idle
(
avRecorder
);
console
.
info
(
'
case avConfig.url is
'
+
avConfig
.
url
);
await
avRecorder
.
pause
().
then
(()
=>
{
console
.
info
(
'
pause AVRecorder success
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
pause AVRecorder failed and catch error is
'
+
err
.
message
);
result
=
false
});
expect
(
result
).
assertEqual
(
false
);
await
avRecorder
.
prepare
(
avConfig
).
then
(()
=>
{
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
PREPARED
);
console
.
info
(
'
prepare success
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
prepare failed and catch error is
'
+
err
.
message
);
});
await
avRecorder
.
release
().
then
(()
=>
{
console
.
info
(
'
release AVRecorder success
'
);
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
RELEASED
);
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
release AVRecorder failed and catch error is
'
+
err
.
message
);
});
}
export
async
function
avRecorderReliabilitTest02
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
avRecorder
=
await
idle
(
avRecorder
);
await
avRecorder
.
prepare
(
avConfig
).
then
(()
=>
{
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
PREPARED
);
console
.
info
(
'
avRecorderReliabilitTest02 prepare success
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest02 prepare failed and catch error is
'
+
err
.
message
);
});
await
avRecorder
.
release
().
then
(()
=>
{
console
.
info
(
'
avRecorderReliabilitTest02 release AVRecorder success
'
);
expect
(
avRecorder
.
state
).
assertEqual
(
AV_RECORDER_STATE
.
RELEASED
);
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
avRecorderReliabilitTest02 release AVRecorder failed and catch error is
'
+
err
.
message
);
});
}
export
async
function
avRecorderReliabilitTest03
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
{
avRecorder
=
await
idle
(
avRecorder
);
setPrepareOnCallback
(
avConfig
,
avRecorder
,
recorderTime
,
done
)
await
avRecorder
.
prepare
(
avConfig
)
}
multimedia/media/media_js_standard/MediaTestBase.js
浏览文件 @
4eb164f7
...
...
@@ -20,7 +20,7 @@ import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import
fileio
from
'
@ohos.fileio
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
import
{
UiDriver
,
BY
,
PointerMatrix
}
from
'
@ohos.UiTest
'
const
CODECMIMEVALUE
=
[
'
video/
avc
'
,
'
audio/mp4a-latm
'
,
'
audio/mpeg
'
]
const
CODECMIMEVALUE
=
[
'
video/
x-h264
'
,
'
audio/mpeg
'
,
'
video/avc
'
,
'
audio/mp4a-latm
'
]
const
context
=
featureAbility
.
getContext
();
export
async
function
getPermission
(
permissionNames
)
{
...
...
multimedia/media/media_js_standard/audioPlayer/src/main/js/test/PlayerLocalTestAudioFUNC.test.js
浏览文件 @
4eb164f7
...
...
@@ -157,7 +157,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
console
.
info
(
'
case getTrackDescription called!!
'
);
if
(
typeof
(
arrayList
)
!=
'
undefined
'
)
{
for
(
let
i
=
0
;
i
<
arrayList
.
length
;
i
++
)
{
mediaTestBase
.
checkDescription
(
arrayList
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
mediaTestBase
.
check
Old
Description
(
arrayList
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
}
}
else
{
console
.
info
(
'
case getTrackDescription is failed
'
);
...
...
@@ -171,7 +171,7 @@ describe('PlayerLocalTestAudioFUNC', function () {
audioPlayer
.
getTrackDescription
((
err
,
arrayList
)
=>
{
if
(
typeof
(
err
)
==
'
undefined
'
)
{
for
(
let
i
=
0
;
i
<
arrayList
.
length
;
i
++
)
{
mediaTestBase
.
checkDescription
(
arrayList
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
mediaTestBase
.
check
Old
Description
(
arrayList
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
}
nextStep
(
mySteps
,
done
);
}
else
{
...
...
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js
浏览文件 @
4eb164f7
...
...
@@ -474,7 +474,7 @@ export default function AVPlayerLocalTest() {
it
(
'
SUB_MULTIMEDIA_MEDIA_VIDEO_PLAYER_GETTRECKDESCRIPTION_0200
'
,
0
,
async
function
(
done
)
{
let
audioTrackKey
=
new
Array
(
'
channel_count
'
,
'
codec_mime
'
,
'
sample_rate
'
,
'
track_index
'
,
'
track_type
'
);
let
audioTrackValue
=
new
Array
(
1
,
2
,
48000
,
0
,
0
);
let
audioTrackValue
=
new
Array
(
1
,
1
,
48000
,
0
,
0
);
let
descriptionKey
=
new
Array
(
audioTrackKey
);
let
descriptionValue
=
new
Array
(
audioTrackValue
);
testCheckTrackDescription
(
fileDescriptor2
,
avPlayer
,
descriptionKey
,
descriptionValue
,
done
)
...
...
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerStabilityTest.test.js
浏览文件 @
4eb164f7
...
...
@@ -81,7 +81,7 @@ export default function AVPlayerStabilityTest() {
beforeAll
(
async
function
()
{
console
.
info
(
'
beforeAll case
'
);
for
(
var
i
=
0
;
i
<
VIDEO_SOURCES
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
VIDEO_SOURCES
.
length
;
i
++
)
{
await
getStageFdRead
(
VIDEO_SOURCES
[
i
]).
then
((
testNumber
)
=>
{
fdNumber
=
testNumber
;
console
.
info
(
TAG
+
'
this fdNumber is :
'
+
fdNumber
)
...
...
@@ -107,12 +107,12 @@ export default function AVPlayerStabilityTest() {
}
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
console
.
info
(
'
beforeEach case
'
);
await
AVPlayerTestBase
.
sleep
(
1000
);
})
afterEach
(
async
function
()
{
afterEach
(
async
function
()
{
if
(
avPlayer
!=
null
)
{
avPlayer
.
release
().
then
(()
=>
{
console
.
info
(
TAG
+
'
this testCase execution completed
'
)
...
...
@@ -122,9 +122,9 @@ export default function AVPlayerStabilityTest() {
await
AVPlayerTestBase
.
sleep
(
1000
);
})
afterAll
(
async
function
()
{
afterAll
(
async
function
()
{
console
.
info
(
'
afterAll case
'
);
for
(
var
i
=
0
;
i
<
fdNumbers
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
fdNumbers
.
length
;
i
++
)
{
await
mediaTestBase
.
closeFdNumber
(
fdNumbers
[
i
]);
}
})
...
...
@@ -223,7 +223,7 @@ export default function AVPlayerStabilityTest() {
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 start
'
)
AVPlayerTestBase
.
avPlayerPlay
(
videos
[
4
],
avPlayer
,
done
);
AVPlayerTestBase
.
avPlayerPlay
(
videos
[
4
],
avPlayer
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 end
'
)
})
...
...
@@ -761,19 +761,7 @@ export default function AVPlayerStabilityTest() {
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
* @tc.name : 001.test play source 4k
* @tc.desc : Local Video play source
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start
'
)
AVPlayerTestBase
.
avPlayerPlay
(
videos
[
43
],
avPlayer
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end
'
)
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_STABILITY_01_0100
...
...
@@ -895,11 +883,11 @@ export default function AVPlayerStabilityTest() {
* @tc.type : Function test
* @tc.level : Level3
*/
// it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) {
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start')
// AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done);
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end')
// })
// it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) {
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start')
// AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done);
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end')
// })
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0110
...
...
@@ -1237,5 +1225,19 @@ export default function AVPlayerStabilityTest() {
AVPlayerTestBase
.
firstFrameTime
(
videos
[
0
],
avPlayer
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_02_0100 end
'
)
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
* @tc.name : 001.test play source 4k
* @tc.desc : Local Video play source
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it
(
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start
'
)
AVPlayerTestBase
.
avPlayerPlay
(
videos
[
43
],
avPlayer
,
done
);
console
.
info
(
TAG
+
'
SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end
'
)
})
})
}
\ No newline at end of file
multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/List.test.ets
浏览文件 @
4eb164f7
...
...
@@ -19,6 +19,7 @@ import AVPlayerLocalTest from './AVPlayerLocalTest.test.js'
import AVPlayerStabilityTest from './AVPlayerStabilityTest.test.js'
import AvPlayerEnumTest from './AvPlayerEnumTest.test.js'
export default function testsuite() {
// AVPlayerHlsFuncTest()
// AVPlayerHttpCompatibilityTest();
...
...
multimedia/media/media_js_standard/avRecorder/src/main/js/test/AVRecorderFuncTest.test.js
浏览文件 @
4eb164f7
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/avRecorder/src/main/js/test/List.test.js
浏览文件 @
4eb164f7
/*
* Copyright (c) 2022
Huawei Device
Co., Ltd.
/*
*
* Copyright (c) 2022
Shenzhen Kaihong Digital Industry Development
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
...
...
@@ -12,9 +12,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
AVRecorderFuncTest
from
'
./AVRecorderFuncTest.test.js
'
import
avRecorderTest
from
'
./AVRecorderFuncTest.test.js
'
export
default
function
testsuite
(
recorderContxt
)
{
AVRecorderFuncTest
(
recorderContxt
)
export
default
function
testsuite
()
{
avRecorderTest
()
}
\ No newline at end of file
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncCallbackTest.test.js
浏览文件 @
4eb164f7
...
...
@@ -243,7 +243,7 @@ describe('VideoPlayerFuncCallbackTest', function () {
videoPlayer
.
getTrackDescription
((
err
,
arrlist
)
=>
{
if
(
err
==
null
)
{
for
(
let
i
=
0
;
i
<
arrlist
.
length
;
i
++
)
{
mediaTestBase
.
checkDescription
(
arrlist
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
mediaTestBase
.
check
Old
Description
(
arrlist
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
}
toNextStep
(
videoPlayer
,
steps
,
done
);
}
else
if
((
err
!=
null
)
&&
(
steps
[
0
]
==
ERROR_EVENT
))
{
...
...
multimedia/media/media_js_standard/videoPlayer/src/main/js/test/VideoPlayerFuncPromiseTest.test.js
浏览文件 @
4eb164f7
...
...
@@ -509,7 +509,7 @@ describe('VideoPlayerFuncPromiseTest', function () {
},
mediaTestBase
.
failureCallback
).
catch
(
mediaTestBase
.
catchCallback
);
for
(
let
i
=
0
;
i
<
arrayDescription
.
length
;
i
++
)
{
mediaTestBase
.
checkDescription
(
arrayDescription
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
mediaTestBase
.
check
Old
Description
(
arrayDescription
[
i
],
descriptionKey
[
i
],
descriptionValue
[
i
]);
}
await
videoPlayer
.
release
().
then
(()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录