androidx / androidx/media

Support synchronized live playback for HLS

Open
#702 0 comments 1 reaction 1 assignee View on GitHub

@tianyif is already working on this.

Since Oct 6, 2023.

enhancement needs triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.