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

Retry playback on error forever for progressive sources #48

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

duvholt
Copy link
Contributor

@duvholt duvholt commented Sep 7, 2022

I'm opening this PR as a discussion on a potential behavior change when playback stops because of exoplayer errors.

When e.g. playing long mp3 files over the network the whole file is usually not buffered which is expected.
The problem is when the user loses network connection and runs out of buffered media ExoPlayer will only retry playback for a fairly short time. After a few retries an error is emitted and the state transitions to idle.
Currently there's no obvious way to resume playback when in idle, but this can be fixed by this related PR #47

However, in my use case it makes sense to retry for a much longer time as the user is likely to regain network connection and then wants to audio to continue playing.

The simplest fix is just to retry forever as I've done is this PR, but it might make more sense to either make this user configurable or just increase the retry count to something bigger. The default is 3.

I only made the change for progressive media sources as I'm not sure if it also makes sense for streaming sources.

The default behavior stops retrying after a fairly short time
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

Successfully merging this pull request may close these issues.

1 participant