未验证 提交 3834f5ef 编写于 作者: O openharmony_ci 提交者: Gitee

!8950 add avplayer. state is idle

Merge pull request !8950 from 董新丽/master
...@@ -240,6 +240,14 @@ export function setAVPlayerFunCb(src, avPlayer, playTest, playTime, done) { ...@@ -240,6 +240,14 @@ export function setAVPlayerFunCb(src, avPlayer, playTest, playTime, done) {
case AV_PLAYER_STATE.INITIALIZED: case AV_PLAYER_STATE.INITIALIZED:
expect(avPlayer.state).assertEqual(AV_PLAYER_STATE.INITIALIZED); expect(avPlayer.state).assertEqual(AV_PLAYER_STATE.INITIALIZED);
avPlayer.surfaceId = surfaceID; avPlayer.surfaceId = surfaceID;
try{
avPlayer.audioRendererInfo = {
content:audio.AudioRendererInfo.CONTENT_TYPE_MUSIC,
usage:audio.AudioRendererInfo.STREAM_USAGE_MEDIA,
}
}catch(e){
console.error(`case stateChange error, e is ${e} ,message:${e.message}`);
}
// step 1, 13: initialized -> prepared // step 1, 13: initialized -> prepared
toPreparePromise(avPlayer, playTest); toPreparePromise(avPlayer, playTest);
break; break;
...@@ -2168,6 +2176,7 @@ export async function testAVPlayerFun(src, avPlayer, playTest, playTime, done) { ...@@ -2168,6 +2176,7 @@ export async function testAVPlayerFun(src, avPlayer, playTest, playTime, done) {
if (typeof(video) != 'undefined') { if (typeof(video) != 'undefined') {
console.info('case createAVPlayer success'); console.info('case createAVPlayer success');
avPlayer = video; avPlayer = video;
expect(avPlayer.state).assertEqual(AV_PLAYER_STATE.IDLE);
} else { } else {
console.error('case createAVPlayer failed'); console.error('case createAVPlayer failed');
expect().assertFail(); expect().assertFail();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册