未验证 提交 713184e9 编写于 作者: O openharmony_ci 提交者: Gitee

!9461 add avplayer

Merge pull request !9461 from 董新丽/OpenHarmony-4.0-Beta2
无相关合并请求
......@@ -106,6 +106,18 @@ export default function AVPlayerMultiTrackTest() {
}, mediaTestBase.failureCallback).catch(mediaTestBase.catchCallback);
}
async function getCurrentAudioTrackCall() {
await avPlayer.getCurrentTrack(0, (err, index) => {
if (err == null) {
console.info(`case current audio track index is ${index}`);
currentTrack = index;
} else {
console.error('getCurrentTrack failed and error is ' + err.message);
}
});
}
async function changeAudioTrack() {
for(let i = 0; i < audioTrackList.length; i++) {
if (audioTrackList[i] != currentTrack) {
......@@ -223,7 +235,7 @@ export default function AVPlayerMultiTrackTest() {
it('SUB_MULTIMEDIA_MEDIA_VIDEO_PLAYER_MULTI_AUDIOTRACK_FUNC_0100', 0, async function (done) {
async function preparedOperation() {
await getAudioTracks();
await getCurrentAudioTrack();
await getCurrentAudioTrackCall();
await changeAudioTrack();
avPlayer.selectTrack(selectedTrack);
expect(currentTrack!=selectedTrack).assertTrue();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部