static createDrmInfoByConfigs_(keySystem, config) {
    /** @type {!Array<string>} */
    const encryptionSchemes = [];

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

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

    /** @type {!Array<!Uint8Array>} */
    const serverCerts = [];

    /** @type {!Array<!shaka.extern.InitDataOverride>} */
    const initDatas = [];

    /** @type {!Set<string>} */
    const keyIds = new Set();

    // TODO: refactor, don't stick drmInfos onto MediaKeySystemConfiguration
    shaka.drm.DrmEngine.processDrmInfos_(
        config['drmInfos'], encryptionSchemes, licenseServers, serverCerts,
        serverCertificateUris, initDatas, keyIds);

    if (encryptionSchemes.length > 1) {
      shaka.log.warning('Multiple unique encryption schemes found! ' +
                        'Only the first will be used.');
    }

    if (serverCerts.length > 1) {
      shaka.log.warning('Multiple unique server certificates found! ' +
                        'Only the first will be used.');
    }

    if (serverCertificateUris.length > 1) {
      shaka.log.warning('Multiple unique server certificate URIs found! ' +
                        'Only the first will be used.');
    }

    if (licenseServers.length > 1) {
      shaka.log.warning('Multiple unique license server URIs found! ' +
                        'Only the first will be used.');
    }

    // TODO: This only works when all DrmInfo have the same robustness.
    const audioRobustness =
        config.audioCapabilities ? config.audioCapabilities[0].robustness : '';
    const videoRobustness =
        config.videoCapabilities ? config.videoCapabilities[0].robustness : '';

    const distinctiveIdentifier = config.distinctiveIdentifier;
    return {
      keySystem,
      encryptionScheme: encryptionSchemes[0],
      licenseServerUri: licenseServers[0],
      distinctiveIdentifierRequired: (distinctiveIdentifier == 'required'),
      persistentStateRequired: (config.persistentState == 'required'),
      sessionType: config.sessionTypes[0] || 'temporary',
      audioRobustness: audioRobustness || '',
      videoRobustness: videoRobustness || '',
      serverCertificate: serverCerts[0],
      serverCertificateUri: serverCertificateUris[0],
      initData: initDatas,
      keyIds,
    };
  }
Creates a DrmInfo object describing the settings used to initialize the
engine.

@param {string} keySystem
@param {MediaKeySystemConfiguration} config
@return {shaka.extern.DrmInfo}

@private