google / google/ExoPlayer

LoadErrorHandlingPolicy for DownloadManager

Open
#8,651 0 comments 0 reactions 1 assignee Claimed by @marcbaechinger View on GitHub
enhancement
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### [REQUIRED] Use case description
I don't want to retry 4xx errors for the download requests, but 5xx errors I would like to retry with exponential backoff, just as it is already done inside `DownloadManager`.

### Proposed solution
Inject a `LoadErrorHandlingPolicy` to `DownloadManager`, similarly to how `minRetryCount` is added.

### Alternatives considered
- Set `minRetryCount` to 0 and handle it myself inside an implementation of Downloader, but this feels kinda backwards.

Note: This is very similar to https://github.com/google/ExoPlayer/issues/6334

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.