title: how to get programDateTime in hls on ios safari?
body: <p>I want to get the programDateTime which is a timestamp in the browser to measure the delay time of HLS. I knew how to get it on the desktop version of Chrome and Safari. However, there is no way to get it with iOS Safari. Do you know any good way?</p>
  
  <p>The following is how to get programDateTime using hls.js. However, this method can not be used because iOS plays hls natively.</p>
  
  <pre><code>hls.on(Hls.Events.FRAG_CHANGED, function(id, data){
      if (data.frag._url) {
          console.log('data',data)
          if (data.frag.programDateTime){
              var progaramDateTime = data.frag.programDateTime;
          } else {
              // for macOS Safari
              var rawProgaramDateTime = data.frag.tagList[2][1];
              rawProgaramDateTime = rawProgaramDateTime.slice(0, -2) + ":" + rawProgaramDateTime.slice(-2);
              var progaramDateTime = Date.parse(rawProgaramDateTime);
          }
          programDateTimeArray.push(progaramDateTime);
  
          console.log('programDateTimeArray',programDateTimeArray)
          if (programDateTimeArray.length == 5){
              programDateTimeArray.shift();
              chunkTime = programDateTimeArray[3] - programDateTimeArray[0];
          }
          var programDateTime = progaramDateTime - chunkTime - 2000;
          mcDelayTime = getCurrentTime() - programDateTime;
          console.log(data.frag._url, mcDelayTime+"ミリ秒遅延しています");
      }
  });
  
  </code></pre>