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

Replay video after end on tap of a button #198

Open
rahul-sysquare opened this issue Aug 14, 2024 · 3 comments
Open

Replay video after end on tap of a button #198

rahul-sysquare opened this issue Aug 14, 2024 · 3 comments

Comments

@rahul-sysquare
Copy link

rahul-sysquare commented Aug 14, 2024

Hi,

I am showing a "play again UI" after the video ends. I want to replay video on tap of play again button. How I can do that?

I'm using tag and when video ends the state is not resetting so I'm not able to replay video.

@eneim
Copy link
Owner

eneim commented Sep 17, 2024

IIRC ExoPlayer tells developer to simply seek the Video to the starting point and call play again. Please try that.

@rahul-sysquare
Copy link
Author

How we can seek in your library? can you share code snippet?

@eneim
Copy link
Owner

eneim commented Sep 18, 2024

Given that you have the Playback instance, calling playback.rewind() should do it.

-->

fun rewind(refresh: Boolean = true) {

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