cleanStreamMap_() {
    const oldPeriodIds = Array.from(this.indexStreamMap_.keys());
    const diffPeriodsIDs = oldPeriodIds.filter((pId) => {
      return !this.lastManifestUpdatePeriodIds_.includes(pId);
    });
    for (const pId of diffPeriodsIDs) {
      let shouldDeleteIndex = true;
      for (const contextId of this.indexStreamMap_.get(pId)) {
        const stream = this.streamMap_.get(contextId);
        if (!stream) {
          continue;
        }
        if (stream.segmentIndex && !stream.segmentIndex.isEmpty()) {
          shouldDeleteIndex = false;
          continue;
        }
        if (this.periodCombiner_) {
          this.periodCombiner_.deleteStream(stream, pId);
        }
        this.streamMap_.delete(contextId);
      }
      if (shouldDeleteIndex) {
        this.indexStreamMap_.delete(pId);
      }
    }
  }
Clean StreamMap Object to remove reference of deleted Stream Object
@private