From 6dff3c562390c99980a3e951f97b19163c84dc88 Mon Sep 17 00:00:00 2001 From: dongxinli Date: Wed, 19 Jul 2023 17:53:16 +0800 Subject: [PATCH] =?UTF-8?q?recorder=20=E6=B8=85=E6=A5=9A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dongxinli --- .../src/main/ets/test/AVPlayerMultiTrackTest.test.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerMultiTrackTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerMultiTrackTest.test.js index 5f2b1da08..9eea897e2 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerMultiTrackTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerMultiTrackTest.test.js @@ -100,10 +100,17 @@ export default function AVPlayerMultiTrackTest() { } async function getCurrentAudioTrack() { + await avPlayer.getCurrentTrack(0).then((index) => { + console.info(`case current audio track index is ${index}`); + currentTrack = index; + }, 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}`); - trackIndex = index; + currentTrack = index; } else { console.error('getCurrentTrack failed and error is ' + err.message); } @@ -227,7 +234,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(); -- GitLab