function buildManifestWithPeriodStartTime(periods) {
    const mpdTemplate = [
      `<MPD type="dynamic"`,
      'availabilityStartTime="1970-01-01T00:00:00Z"',
      'timeShiftBufferDepth="PT10H">',
      '    %(periods)s',
      '</MPD>',
    ].join('\n');
    const periodTemplate = (id, period, duration) => {
      return [
        `    <Period id="${id}" start="PT${period}S">`,
        '        <AdaptationSet mimeType="video/mp4" lang="en" group="1">',
        '            <SegmentTemplate startNumber="1" media="l-$Number$.mp4">',
        '                <SegmentTimeline>',
        `                    <S t="0" d="${duration}" />`,
        '                </SegmentTimeline>',
        '            </SegmentTemplate>',
        '            <Representation id="1"/>',
        '        </AdaptationSet>',
        '    </Period>',
      ].join('\n');
    };
    const periodXmls = periods.map((period, i) => {
      const duration = i+1 === periods.length ? 10 : periods[i+1] - period;
      // Period start time as ID here. If we use index then there will be
      // periods with same period ID and different start time which are invalid.
      return periodTemplate(period, period, duration);
    });
    return sprintf(mpdTemplate, {
      periods: periodXmls.join('\n'),
    });
  }
@param {!Array<number>} periods Start time of multiple periods
@return {string}