static processNonLinearAd_(interstitials, currentTime, nonLinear) {
    const TXml = shaka.util.TXml;
    let mimeType = null;
    let resource = TXml.findChild(nonLinear, 'StaticResource');
    if (resource) {
      mimeType = resource.attributes['creativeType'];
    } else {
      resource = TXml.findChild(nonLinear, 'HTMLResource');
      if (!resource) {
        return;
      }
      mimeType = 'text/html';
    }
    let adUrl = TXml.getContents(resource);
    if (!adUrl) {
      return;
    }
    if (mimeType === 'text/html') {
      adUrl = 'data:text/html;charset=UTF-8,' + encodeURIComponent(adUrl);
    }
    const width = TXml.parseAttr(nonLinear, 'width', TXml.parseInt) ||
        TXml.parseAttr(nonLinear, 'expandedWidth', TXml.parseInt);
    const height = TXml.parseAttr(nonLinear, 'height', TXml.parseInt) ||
        TXml.parseAttr(nonLinear, 'expandedHeight', TXml.parseInt);
    if (!width && !height) {
      return;
    }
    let playoutLimit = null;
    const minSuggestedDuration =
        nonLinear.attributes['minSuggestedDuration'];
    if (minSuggestedDuration) {
      playoutLimit = shaka.util.TextParser.parseTime(minSuggestedDuration);
    }
    let startTime = 0;
    if (currentTime != null) {
      startTime = currentTime;
    }
    interstitials.push({
      id: null,
      groupId: null,
      startTime: startTime,
      endTime: null,
      uri: adUrl,
      mimeType,
      isSkippable: false,
      skipOffset: null,
      skipFor: null,
      canJump: false,
      resumeOffset: 0,
      playoutLimit,
      once: true,
      pre: currentTime == null,
      post: currentTime == Infinity,
      timelineRange: false,
      loop: false,
      overlay: {
        viewport: {
          x: 0,
          y: 0,
        },
        topLeft: {
          x: 0,
          y: 0,
        },
        size: {
          x: width || 0,
          y: height || 0,
        },
      },
      displayOnBackground: false,
      currentVideo: null,
      background: null,
    });
  }
@param {!Array<shaka.extern.AdInterstitial>} interstitials
@param {?number} currentTime
@param {!shaka.extern.xml.Node} nonLinear
@private