newInitData(initDataType, initData) {
    if (!initData.length) {
      return;
    }

    // Suppress duplicate init data.
    // Note that some init data are extremely large and can't portably be used
    // as keys in a dictionary.

    if (this.config_.ignoreDuplicateInitData) {
      const metadatas = this.activeSessions_.values();
      for (const metadata of metadatas) {
        if (shaka.util.BufferUtils.equal(initData, metadata.initData)) {
          shaka.log.debug('Ignoring duplicate init data.');
          return;
        }
      }
      let duplicate = false;
      this.storedPersistentSessions_.forEach((metadata, sessionId) => {
        if (!duplicate &&
            shaka.util.BufferUtils.equal(initData, metadata.initData)) {
          duplicate = true;
        }
      });
      if (duplicate) {
        shaka.log.debug('Ignoring duplicate init data.');
        return;
      }
    }

    // Mark that there is init data, so that the preloader will know to wait
    // for sessions to be loaded.
    this.hasInitData_ = true;

    // If there are pre-existing sessions that have all been loaded
    // then reset the allSessionsLoaded_ promise, which can now be
    // used to wait for new sessions to be loaded
    if (this.activeSessions_.size > 0 && this.areAllSessionsLoaded_()) {
      this.allSessionsLoaded_.resolve();
      this.hasInitData_ = false;
      this.allSessionsLoaded_ = new shaka.util.PublicPromise();
      this.allSessionsLoaded_.catch(() => {});
    }
    this.createSession(initDataType, initData,
        this.currentDrmInfo_.sessionType);
  }
Called when new initialization data is encountered.  If this data hasn't
been seen yet, this will create a new session for it.

@param {string} initDataType
@param {!Uint8Array} initData