createDrmInfoByInfos_(keySystem, drmInfos) {
    /** @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();

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

    shaka.drm.DrmEngine.processDrmInfos_(
        drmInfos, encryptionSchemes, licenseServers, serverCerts,
        serverCertificateUris, initDatas, keyIds, keySystemUris);

    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 (licenseServers.length > 1) {
      shaka.log.warning('Multiple unique license server URIs 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.');
    }

    const defaultSessionType =
        this.usePersistentLicenses_ ? 'persistent-license' : 'temporary';

    /** @type {shaka.extern.DrmInfo} */
    const res = {
      keySystem,
      encryptionScheme: encryptionSchemes[0],
      licenseServerUri: licenseServers[0],
      distinctiveIdentifierRequired: drmInfos[0].distinctiveIdentifierRequired,
      persistentStateRequired: drmInfos[0].persistentStateRequired,
      sessionType: drmInfos[0].sessionType || defaultSessionType,
      audioRobustness: drmInfos[0].audioRobustness || '',
      videoRobustness: drmInfos[0].videoRobustness || '',
      serverCertificate: serverCerts[0],
      serverCertificateUri: serverCertificateUris[0],
      initData: initDatas,
      keyIds,
    };

    if (keySystemUris.size > 0) {
      res.keySystemUris = keySystemUris;
    }

    for (const info of drmInfos) {
      if (info.distinctiveIdentifierRequired) {
        res.distinctiveIdentifierRequired = info.distinctiveIdentifierRequired;
      }

      if (info.persistentStateRequired) {
        res.persistentStateRequired = info.persistentStateRequired;
      }
    }

    return res;
  }
Creates a DrmInfo object describing the settings used to initialize the
engine.

@param {string} keySystem
@param {!Array<shaka.extern.DrmInfo>} drmInfos
@return {shaka.extern.DrmInfo}

@private