Support continued playback of merged source if some child sources are unavailable
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue description
I need to create a player in which multiple live streams should play in synchronization, which I've achieved by following @ojw28 solution in #2855. I'm able to play multiple live streams using multiple renderers.
Now when any of the live streams are broken (not broadcasting or the link does not exist at all - HTTP 404), none of the renderers start playing, all of the provide source should be live to start playback.
I'm getting source list from API and their live status are unknown to me.
Is there any way I can play the rest of the renderer if any of the sources is unavailable?
One way I can see is to implement `MediaSourceEventListener` and track which source is having an issue and then get the index of the renderer attached with the source and update `TrackSelector` for not to load that renderer.
Don't know if its a right approach or not.
Can you please guide me.
Thanks in advance!
### Reproduction steps
Same as @derekw0311 described in issue #4014:
>
1. Build a custom RenderersFactory that builds multiple video renderers.
2. Create multiple ExtractorMediaSources and combine them use MergingMediaSource
3. Build a custom TrackSelector to select correct tracks for each of the video renderers
4. Map textureSurface to the corresponding renderers using 'createMessage'
### Link to test content
Unfortunately, my media server is on my local environment so I cannot share the live feed links but you can use some open VOD links like:
- http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
- http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
For the unavailable stream, you can use any dummy link.
### Version of ExoPlayer being used
ExoPlayer: 2.8.3
### Device(s) and version(s) of Android being used
I've tested this on Galaxy S8, OnePlus One, Nexus 5X devices
and on Android OS version 7.1 and 8.1
### A full bug report captured from the device
NA
Contributor guide
Assessment
This issue has not been assessed yet.