clearImpl_(type) {
    if (!this.segments[type]) {
      throw new Error('unexpected type');
    }

    this.segments[type] = this.segments[type].map((c) => false);

    const ContentType = shaka.util.ManifestParserUtils.ContentType;

    // If we're clearing video, clear the segment list for 'trickvideo', too.
    if (type == ContentType.VIDEO && this.segments['trickvideo']) {
      // 'trickvideo' value is only used for testing.
      // Cast to the ContentType enum for compatibility.
      this.clearImpl_(
          /** @type {shaka.util.ManifestParserUtils.ContentType} */(
            'trickvideo'));
    }

    return Promise.resolve();
  }
@param {string} type
@return {!Promise}
@private