getContextIdsFromPath_(paths) {
    let periodId = '';
    let adaptationSetId = '';
    let adaptationSetPosition = -1;
    let representationId = '';
    for (const node of paths) {
      if (node.name === 'Period') {
        periodId = node.id;
      } else if (node.name === 'AdaptationSet') {
        adaptationSetId = node.id;
        if (node.position !== null) {
          adaptationSetPosition = node.position;
        }
      } else if (node.name === 'Representation') {
        representationId = node.id;
      }
    }

    /** @type {!Array<string>} */
    const contextIds = [];

    if (representationId) {
      contextIds.push(periodId + ',' + representationId);
    } else {
      if (adaptationSetId) {
        for (const context of this.contextCache_.values()) {
          if (context.period.id === periodId &&
              context.adaptationSet.id === adaptationSetId &&
              context.representation.id) {
            contextIds.push(periodId + ',' + context.representation.id);
          }
        }
      } else {
        if (adaptationSetPosition > -1) {
          for (const context of this.contextCache_.values()) {
            if (context.period.id === periodId &&
                context.adaptationSet.position === adaptationSetPosition &&
                context.representation.id) {
              contextIds.push(periodId + ',' + context.representation.id);
            }
          }
        }
      }
    }

    return contextIds;
  }
@param {!Array<shaka.util.TXml.PathNode>} paths
@return {!Array<string>}
@private