google / google/ExoPlayer

Provide a way to access information from all the EXT-X-PROGRAM-DATE-TIME tags in a playlist

Open
#10,463 0 comments 0 reactions 1 assignee Assigned to @tianyif View on GitHub
enhancement needs triage
Dominant language
Java
Stars
21.9k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

### Use case description
Currently ExoPlayer ignores all the EXT-X-PROGRAM-DATE-TIME (PDT) tags save for the very first one in a media playlist. When such a playlist has no gaps between the segments no information is lost. However, in some cases playlists do have gaps and for such playlists the PDT information is lost during the playlist parsing.

Let's say an application wants to detect playlists' gaps, for example to show its users a message about some content being lost.
To achieve this the app extends ParsingLoadable.Parser and calculates the PDT for each segment.
However, the information about the gaps is lost and using something like
```Java
HlsMediaPlaylist.startTimeUs + SegmentBase.relativeStartTimeUs
```
ignores gaps and does not provide the required data.

### Proposed solution
As there is no request here to modify the playback in any way, just a request to propagate the missing information,
the preferred solution would be to add to the
```Java
HlsMediaPlaylist.Segment
```
class an additional field which contains either _absolute PDT including the gaps_ or _adjusted for gaps relative start time_.

### Note:
This appears to be similar to https://github.com/google/ExoPlayer/issues/8312. The main difference is that the current issue does not have any requirement to modify the playback behavior, while https://github.com/google/ExoPlayer/issues/8312 has such a requirement.

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.