Support providing a secondary or fallback url to the player
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### [REQUIRED] Searched documentation and issues
SimpleExoplayer docs and also looked at LoadErrorHandlingPolicy but this does not help me solve the problem.
### [REQUIRED] Question
Is there is a way to pass a fallback or secondary m3u8 to exoplayer. Though, I can handle this externally as well but trying to find if exoplayer has an option. I receive 2 URLs(m3u8) from the server, primary and secondary. We try to start the playback with primary URL and if there is an error after retrying 3 times, we try to play from secondary url and if that errors out after 3 retries, we throw a player exception. Is there some API or class I can use to make this bit seamless.
Currently, I am listening to
```override fun onPlayerError(error: ExoPlaybackException?)``` and once I receive that, I start the fallback mechanism.
Also, I think MediaSource already uses `DefaultLoadErrorHandlingPolicy` which retries the loading for 3 times and then throw an error, so I think exoplayer already handles my retrying requirement. Only thing I am looking, in that case, is if there is a way to pass secondary or fallback URL.
Contributor guide
Assessment
This issue has not been assessed yet.