Expose #EXT-X-PROGRAM-DATE-TIME in timeChanged event for Relive streams

Feature request

When replaying a VOD of a former live stream additionally to exposing the time and timestamp in the timeChanged event, we would also like to get an (optional) datetime timestamp based on the presence of #EXT-X-PROGRAM-DATE-TIME in the HLS manifest, returning the wall clock time of the stream when it aired initially.

Reason

At the moment, there is no clean way of retrieving the original time of broadcast for a live streamed video, which we would need as we are syncing an overlay with information based on when they happened.

E.g. for a football match a goal happened at wallclock time 20:00 UTC - we want to then show an UI to the user letting them know at 20:00 UTC, which works when the player is still in live mode as the time in the timeChanged event is returning the absolute time based on #EXT-X-PROGRAM-DATE-TIME.

However, the recording is then in VOD mode, which means the time returns a relative value (e.g. 100 seconds from the beginning of the video). Using getCurrentTime(TimeMode.absolute) also only returns a relative time

Current workaround

We are aware of the SegmentPlayback event, which does actually return this value, however it is not the cleanest way to retrieve this data as:

  • You have to use the tweaks.native_hls_parsing settings for Safari - which has other disadvantages
  • The SegmentPlayback event is only returning the dateTime on every few events, which means we have to store away the old value until it gets overridden with a new one plus with 6 seconds of segment length it’s not ideal

Hey Fabian, thanks very much for posting this feature request and also thanks to everyone who has voted. The use case you have makes sense to me and I understand how the #EXT-X-PROGRAM-DATE-TIME data will allow you to sync the user experience (eg. goal overlay) with video (when the goal happened).

Exposing #EXT-X-PROGRAM-DATE-TIME or additional datetime fields isn’t currently on our roadmap, however, given the popularity of this feature in our community I’ll revisit the topic with our team.

1 Like