Support synchronized live playback for HLS
@tianyif is already working on this.
Since Oct 6, 2023.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Use case description
Multiple Android TV streamers in a bar or other hospitality situation require video synchronized to a single live offset. This feature is documented in https://developer.android.com/guide/topics/media/exoplayer/live-streaming
The problem is this unlikely to work for HLS, as there is no spec mandated synchronization of time in the client to common time (NTP or the origin server). The spec does recommend msec accurate wall-clock time in the playlist:
#EXT-X-PROGRAM-DATE-TIME:
where date-time-msec is an ISO/IEC 8601:2004 [ISO_8601] date/time
representation, such as YYYY-MM-DDThh:mm:ss.SSSZ. It SHOULD indicate
a time zone and fractional parts of seconds, to millisecond accuracy.
So, all the pieces except for time synchronization are present.
Note, this is also requested in https://github.com/google/ExoPlayer/issues/10990
Proposed solution
Simple, synchronize `androidx.media3.exoplayer.hls.HlsMediaSource.Factory#elapsedRealTimeOffsetMs
Alternatives considered
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.