Program Date Time

Introduction

THEOplayer has support for associating media segments with an absolute date and time. This can be useful when you want to synchronise video playback with displaying other relevant information about the video stream.

THEOplayer enables this feature by making use of the EXT-X-PROGRAM-DATE-TIME information that gets embedded in the HLS manifest file.

API and usage

Once the EXT-X-PROGRAM-DATE-TIME information is set in the HLS manifest, reading and setting the current program date time information on a THEOplayer instance is fairly straight forward. Start by obtaining a reference to the THEOplayer instance:

theoplayer.player(identifier);      

On this THEOplayer instance, the following API attributes are available for controlling the current program data time:

AttributeDescription
currentProgramDateTime Sets or returns the current program date time reference. This message is calculated from the PROGRAM-DATE-TIME tag. Setting the property will seek to the playback position to the new program date time. (Date object)

The value of the currentProgramDateTime gets updated with each timeupdate event thrown by the THEOplayer instance.

Support Table

This feature is supported on all browsers supported by THEOplayer.

Internet Explorer 10+

Internet Explorer 10+

Firefox

Firefox

Chrome

Chrome

Safari

Safari

Opera

Opera

Edge

Edge

Windows Phone

Windows Phone

Android

Android

iOS

iOS

Vivaldi

Vivaldi