Radiant Media Player

HLS Program date time

Documentation sections

Scope of support

The EXT-X-PROGRAM-DATE-TIME tag in HLS associates the first sample of a Media Segment with an absolute date and/or time. It applies only to the next Media Segment. More information can be found in HLS specification.

The retrieval of program date time is only supported when using hls.js with our player. It is thus not available on iOS.

Program date time metadata through player API

Since Radiant Media Player version 5.2.1 we provide native and easy-to-use extraction of program date time metadata through our player API:

Program date time API event

meta: this event fires each time program date time metadata are updated.

Program date time API method


When invoked, this method will return Object|null representing the current program date time metadata. The returned Object when available will have the following structure:

  data: {
    programDateTime: Number, // epoch time in seconds for start of program date time
    rawProgramDateTime: String, // Date time for program date time (ISO/IEC 8601:2004)
    endProgramDateTime: Number, // epoch time in seconds for end of program date time
    start: Number, // start time of the metadata in seconds
    end: Number // end time of the metadata in seconds
  type: "program-date-time"

Depending on your HLS stream not all attributes from the data object may be available

Player code example

<script src="https://cdn.radiantmediatechs.com/rmp/5.11.5/js/rmp.min.js"></script>
<div id="rmpPlayer"></div>
  var src = {
    hls: 'https://your-live-hls-stream-with-program-date-time-metadata.m3u8'
  var settings = {
    licenseKey: 'your-license-key',
    src: src,
    width: 640,
    height: 360
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  var rmpContainer = document.getElementById('rmpPlayer');
  // We listen to meta API event
  rmpContainer.addEventListener('meta', function () {
    // Each time meta event fires, getMetadata API method is updated and can be queried
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.