Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seekTo()方法无效--->已找到原因,请忽略 #20

Open
pyzheng opened this issue Dec 20, 2022 · 2 comments
Open

seekTo()方法无效--->已找到原因,请忽略 #20

pyzheng opened this issue Dec 20, 2022 · 2 comments

Comments

@pyzheng
Copy link

pyzheng commented Dec 20, 2022

mVideoPlayer.setDataSource(liveRoom.getLivePlayUrl());
mVideoPlayer.prepareAsync();

......

Log.d(msg,"=================> positionMs=" + (positionMs/1000));
Log.d(msg,"=================> player.getCurrentPosition()1=" + player.getCurrentPosition());
player.seekTo(positionMs);
Log.d(msg,"=================> player.getCurrentPosition()2=" + player.getCurrentPosition());

player.seekTo(positionMs)的前后获取的player.getCurrentPosition()居然是一样的。视频也没有前进到指定时间。

@pyzheng
Copy link
Author

pyzheng commented Dec 20, 2022

找到问题了,请忽略。 源码里面跳转判断播放了才能跳转,刚好我在跳转之前,先暂停。 取消暂停,直接跳转,就可以了。谢谢

@pyzheng pyzheng changed the title seekTo()方法无效 seekTo()方法无效--->已找到原因,请忽略 Dec 20, 2022
@hty527
Copy link
Owner

hty527 commented May 26, 2023

客气了~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants