From ff619c36b2327348ce580e155b885c8fbf36481e Mon Sep 17 00:00:00 2001 From: dongxinli Date: Thu, 8 Jun 2023 11:24:20 +0800 Subject: [PATCH] avpalyer.state is idle Signed-off-by: dongxinli --- multimedia/media/media_js_standard/AVPlayerTestBase.js | 2 +- .../avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/multimedia/media/media_js_standard/AVPlayerTestBase.js b/multimedia/media/media_js_standard/AVPlayerTestBase.js index 8292a7bfb..5d9b873a0 100644 --- a/multimedia/media/media_js_standard/AVPlayerTestBase.js +++ b/multimedia/media/media_js_standard/AVPlayerTestBase.js @@ -2166,9 +2166,9 @@ export async function testAVPlayerFun(src, avPlayer, playTest, playTime, done) { console.info(`case media source: ${src}`) await media.createAVPlayer().then((video) => { if (typeof(video) != 'undefined') { + expect(avPlayer.state).assertEqual('idle'); console.info('case createAVPlayer success'); avPlayer = video; - expect(avPlayer.state).assertEqual('idle'); } else { console.error('case createAVPlayer failed'); expect().assertFail(); diff --git a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js index 1c7745b99..620dcfb02 100644 --- a/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js +++ b/multimedia/media/media_js_standard/avPlayer/entry/src/main/ets/test/AVPlayerLocalTest.test.js @@ -136,9 +136,9 @@ export default function AVPlayerLocalTest() { media.createAVPlayer((err, video) => { console.info(`case media err: ${err}`) if (typeof (video) != 'undefined') { + expect(avPlayer.state).assertEqual('idle'); console.info('case createAVPlayer success'); avPlayer = video; - expect(avPlayer.state).assertEqual('idle'); setAVPlayerTrackCb(avPlayer, descriptionKey, descriptionValue, done) setSource(avPlayer, src); } -- GitLab