Support EXT-X-GAP without jumping forward if audio is missing
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### [REQUIRED] Use case description
We are investigating how to support “playing” through gaps in HLS segment data in ExoPlayer.
We have a use case where we do not want to insert discontinuity tags and skip over gaps in certain streams because we’re aligning them with other concurrently playing streams. We’ve noticed that if we note the duration of the segment to be larger than the amount of data in the actual segment, the player will stall due to the fact the media codec does not find frames to decode and the media clock does not continue to increment even though the forward buffer says we have data currently. The iOS AVFoundation player deals with this situation by displaying the last frame it decoded for the duration of the gap in data before picking up and displaying the first frame from the following segment at the appropriate PTS time.
### Proposed solution
This could be addressed in the player by ensuring the player doesn't stall when no frame is decoded even though the loaders indicate we have sufficient forward buffer. I'm curious as to what the ExoPlayer team thinks about advancing the media clock in this scenario.
OR
This could potentially be fit for usage of the `EXT-X-GAP` tag. See [draft spec](https://developer.apple.com/streaming/HLS-WWDC-2017-Preliminary-Spec.pdf), although the draft spec does not specify the behavior when no rendition exists without the gap.
### Alternatives considered
Just the two from the Proposal section
Contributor guide
Assessment
This issue has not been assessed yet.