appendTemplateInfo(info, periodStart, periodEnd, initSegmentReference) {
    this.updateInitSegmentReference(initSegmentReference);
    if (!this.templateInfo_) {
      this.templateInfo_ = info;
      this.periodStart_ = periodStart;
      this.periodEnd_ = periodEnd;
    } else {
      const currentTimeline = this.templateInfo_.timeline;

      if (this.templateInfo_.mediaTemplate !== info.mediaTemplate) {
        this.templateInfo_.mediaTemplate = info.mediaTemplate;
      }

      // Append timeline
      let newEntries;
      if (currentTimeline.length) {
        const lastCurrentEntry = currentTimeline[currentTimeline.length - 1];
        newEntries = info.timeline.filter((entry) => {
          return entry.end > lastCurrentEntry.end;
        });
      } else {
        newEntries = info.timeline.slice();
      }

      if (newEntries.length > 0) {
        shaka.log.debug(`Appending ${newEntries.length} entries`);
        this.templateInfo_.timeline.push(...newEntries);
      }

      if (this.periodEnd_ !== periodEnd) {
        this.periodEnd_ = periodEnd;
      }
    }

    this.fitTimeline();
  }
Merge new template info
@param {shaka.dash.SegmentTemplate.SegmentTemplateInfo} info
@param {number} periodStart
@param {number} periodEnd
@param {shaka.media.InitSegmentReference} initSegmentReference