提交 a0917ab2 编写于 作者: D dongxinli

avpalyer.state is idle

Signed-off-by: Ndongxinli <dongxinli@huawei.com>
上级 ff619c36
......@@ -240,6 +240,14 @@ export function setAVPlayerFunCb(src, avPlayer, playTest, playTime, done) {
case AV_PLAYER_STATE.INITIALIZED:
expect(avPlayer.state).assertEqual(AV_PLAYER_STATE.INITIALIZED);
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
toPreparePromise(avPlayer, playTest);
break;
......@@ -2166,9 +2174,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(AV_PLAYER_STATE.IDLE);
} else {
console.error('case createAVPlayer failed');
expect().assertFail();
......
......@@ -136,7 +136,6 @@ 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;
setAVPlayerTrackCb(avPlayer, descriptionKey, descriptionValue, done)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册