Skip to content

Comments

Retry playback on error forever for progressive sources#48

Draft
duvholt wants to merge 1 commit intodoublesymmetry:mainfrom
duvholt:exoplayer-retry-forever
Draft

Retry playback on error forever for progressive sources#48
duvholt wants to merge 1 commit intodoublesymmetry:mainfrom
duvholt:exoplayer-retry-forever

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