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

error时点击retry按钮无法继续播放,而是从头播放 #125

Closed
lipangit opened this issue Apr 28, 2020 · 3 comments
Closed

error时点击retry按钮无法继续播放,而是从头播放 #125

lipangit opened this issue Apr 28, 2020 · 3 comments

Comments

@lipangit
Copy link
Member

**需求描述

随时通过临时变量记录播放时间,retry时从这个时间继续播放。

**其他app是否实现

**截图或者小视频说明

@lipangit
Copy link
Member Author

创建一个变量 复写onProgress函数 将当前的进度赋值给这个变量 retry的时候 将这个变量赋值给seekToInadvance 他就会自动从这个变量开始播放

@lipangit
Copy link
Member Author

以前的记录progress是在正常退出的时候,从mediaplayer取得currentPosition。 这次是要求在error的时候记录progress,因为已经error了mediaplayer取得不到currentPosition。

@lipangit
Copy link
Member Author

所以要复写onProgress函数 随时取得currentPosition保存到变量 error之后从这个position开始播放

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