static mapNativeCueToShakaCue(vttCue) {
    if (vttCue.endTime === Infinity || vttCue.endTime < vttCue.startTime) {
      return null;
    }
    const cue = new shaka.text.Cue(vttCue.startTime, vttCue.endTime,
        vttCue.text);
    cue.line = typeof vttCue.line === 'number' ? vttCue.line : null;
    if (vttCue.lineAlign) {
      cue.lineAlign = /** @type {shaka.text.Cue.lineAlign} */
        (vttCue.lineAlign);
    }
    cue.lineInterpretation = vttCue.snapToLines ?
      shaka.text.Cue.lineInterpretation.LINE_NUMBER :
      shaka.text.Cue.lineInterpretation.PERCENTAGE;
    cue.position = typeof vttCue.position === 'number' ?
      vttCue.position : null;
    if (vttCue.positionAlign) {
      cue.positionAlign = /** @type {shaka.text.Cue.positionAlign} */
        (vttCue.positionAlign);
    }
    cue.size = vttCue.size;
    cue.textAlign = /** @type {shaka.text.Cue.textAlign} */ (vttCue.align);
    if (vttCue.vertical === 'lr') {
      cue.writingMode = shaka.text.Cue.writingMode.VERTICAL_LEFT_TO_RIGHT;
    } else if (vttCue.vertical === 'rl') {
      cue.writingMode = shaka.text.Cue.writingMode.VERTICAL_RIGHT_TO_LEFT;
    }
    if (vttCue.region) {
      cue.region.id = vttCue.region.id;
      cue.region.height = vttCue.region.lines;
      cue.region.heightUnits = shaka.text.CueRegion.units.LINES;
      cue.region.regionAnchorX = vttCue.region.regionAnchorX;
      cue.region.regionAnchorY = vttCue.region.regionAnchorY;
      cue.region.scroll = /** @type {shaka.text.CueRegion.scrollMode} */
        (vttCue.region.scroll);
      cue.region.viewportAnchorX = vttCue.region.viewportAnchorX;
      cue.region.viewportAnchorY = vttCue.region.viewportAnchorY;
      cue.region.viewportAnchorUnits = shaka.text.CueRegion.units.PERCENTAGE;
      cue.region.width = vttCue.region.width;
      cue.region.widthUnits = shaka.text.CueRegion.units.PERCENTAGE;
    }
    shaka.text.Cue.parseCuePayload(cue);

    return cue;
  }
@param {!VTTCue} vttCue
@return {?shaka.text.Cue}