finalizeStreams_(streamInfos) {
    if (!this.isLive_()) {
      const minDuration = this.getMinDuration_();
      for (const streamInfo of streamInfos) {
        streamInfo.stream.segmentIndex.fit(/* periodStart= */ 0, minDuration);
      }
    }
    this.notifySegmentsForStreams_(streamInfos.map((s) => s.stream));

    const activeStreamInfos = Array.from(this.uriToStreamInfosMap_.values())
        .filter((s) => s.stream.segmentIndex);
    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    const hasAudio =
        activeStreamInfos.some((s) => s.stream.type == ContentType.AUDIO);
    const hasVideo =
        activeStreamInfos.some((s) => s.stream.type == ContentType.VIDEO);

    const liveWithNoProgramDateTime =
        this.isLive_() && !this.usesProgramDateTime_;
    const vodWithOnlyAudioOrVideo = !this.isLive_() &&
        this.usesProgramDateTime_ && !(hasAudio && hasVideo);
    if (this.config_.hls.ignoreManifestProgramDateTime ||
        liveWithNoProgramDateTime || vodWithOnlyAudioOrVideo) {
      this.syncStreamsWithSequenceNumber_(
          streamInfos, liveWithNoProgramDateTime);
    } else {
      this.syncStreamsWithProgramDateTime_(streamInfos);
      if (this.config_.hls.ignoreManifestProgramDateTimeForTypes.length > 0) {
        this.syncStreamsWithSequenceNumber_(streamInfos);
      }
    }
  }
@param {!Array<!shaka.hls.HlsParser.StreamInfo>} streamInfos
@private