initParser(mimeType, sequenceMode, segmentRelativeVttTiming, manifestType) {
    // No parser for CEA, which is extracted from video and side-loaded
    // into TextEngine and TextDisplayer.
    if (mimeType == shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE ||
        mimeType == shaka.util.MimeUtils.CEA708_CLOSED_CAPTION_MIMETYPE) {
      this.parser_ = null;
      return;
    }

    const factory = shaka.text.TextEngine.parserMap_.get(mimeType);
    goog.asserts.assert(
        factory, 'Text type negotiation should have happened already');
    this.parser_ = factory();
    if (this.parser_.setSequenceMode) {
      this.parser_.setSequenceMode(sequenceMode);
    } else {
      shaka.Deprecate.deprecateFeature(5,
          'Text parsers w/ setSequenceMode',
          'Text parsers should have a "setSequenceMode" method!');
    }
    if (this.parser_.setManifestType) {
      this.parser_.setManifestType(manifestType);
    } else {
      shaka.Deprecate.deprecateFeature(5,
          'Text parsers w/ setManifestType',
          'Text parsers should have a "setManifestType" method!');
    }
    this.segmentRelativeVttTiming_ = segmentRelativeVttTiming;
  }
Initialize the parser.  This can be called multiple times, but must be
called at least once before appendBuffer.

@param {string} mimeType
@param {boolean} sequenceMode
@param {boolean} segmentRelativeVttTiming
@param {string} manifestType