async fairplayDrmParser_(drmTag, mimeType, initSegmentRef) {
    if (mimeType == 'video/mp2t') {
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.MANIFEST,
          shaka.util.Error.Code.HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED);
    }

    if (shaka.drm.DrmUtils.isMediaKeysPolyfilled('apple')) {
      throw new shaka.util.Error(
          shaka.util.Error.Severity.CRITICAL,
          shaka.util.Error.Category.MANIFEST,
          shaka.util.Error.Code
              .HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED);
    }

    const method = drmTag.getRequiredAttrValue('METHOD');
    const VALID_METHODS = ['SAMPLE-AES', 'SAMPLE-AES-CTR'];
    if (!VALID_METHODS.includes(method)) {
      shaka.log.error('FairPlay in HLS is only supported with [',
          VALID_METHODS.join(', '), '], not', method);
      return null;
    }

    let encryptionScheme = 'cenc';
    if (method == 'SAMPLE-AES') {
      // It should be 'cbcs-1-9' but Safari doesn't support it.
      // See: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/encryptedmedia/MediaKeyEncryptionScheme.idl
      encryptionScheme = 'cbcs';
    }

    const uri = drmTag.getRequiredAttrValue('URI');

    /*
     * Even if we're not able to construct initData through the HLS tag, adding
     * a DRMInfo will allow DRM Engine to request a media key system access
     * with the correct keySystem and initDataType
     */
    const drmInfo = shaka.util.ManifestParserUtils.createDrmInfo(
        'com.apple.fps', encryptionScheme, [
          {initDataType: 'sinf', initData: new Uint8Array(0), keyId: null},
        ], uri);

    let keyId = shaka.drm.FairPlay.defaultGetKeyId(uri);
    if (!keyId && initSegmentRef) {
      keyId = await this.getKeyIdFromInitSegment_(initSegmentRef);
    }
    if (keyId) {
      drmInfo.keyIds.add(keyId);
    }

    return drmInfo;
  }
@param {!shaka.hls.Tag} drmTag
@param {string} mimeType
@param {?shaka.media.InitSegmentReference} initSegmentRef
@return {!Promise<?shaka.extern.DrmInfo>}
@private