function alignStream(lastFrag, lastLevel, details) {
  if (!lastLevel) {
    return;
  }

  alignDiscontinuities(lastFrag, details, lastLevel);

  if (!details.alignedSliding && lastLevel.details) {
    // If the PTS wasn't figured out via discontinuity sequence that means there was no CC increase within the level.
    // Aligning via Program Date Time should therefore be reliable, since PDT should be the same within the same
    // discontinuity sequence.
    alignPDT(details, lastLevel.details);
  }

  if (!details.alignedSliding && lastLevel.details && !details.skippedSegments) {
    // Try to align on sn so that we pick a better start fragment.
    // Do not perform this on playlists with delta updates as this is only to align levels on switch
    // and adjustSliding only adjusts fragments after skippedSegments.
    Object(_controller_level_helper__WEBPACK_IMPORTED_MODULE_2__["adjustSliding"])(lastLevel.details, details);
  }
}
Using the parameters of the last level, this function computes PTS' of the new fragments so that they form a
contiguous stream with the last fragments.
The PTS of a fragment lets Hls.js know where it fits into a stream - by knowing every PTS, we know which fragment to
download at any given time. PTS is normally computed when the fragment is demuxed, so taking this step saves us time
and an extra download.
@param lastFrag
@param lastLevel
@param details