constructor(nativeMediaKeys, sessionType) {
    shaka.log.debug('PatchedMediaKeysApple.MediaKeySession');
    super();

    /**
     * The native MediaKeySession, which will be created in generateRequest.
     * @private {WebKitMediaKeySession}
     */
    this.nativeMediaKeySession_ = null;

    /** @private {WebKitMediaKeys} */
    this.nativeMediaKeys_ = nativeMediaKeys;

    // Promises that are resolved later
    /** @private {shaka.util.PublicPromise} */
    this.generateRequestPromise_ = null;

    /** @private {shaka.util.PublicPromise} */
    this.updatePromise_ = null;

    /** @private {!shaka.util.EventManager} */
    this.eventManager_ = new shaka.util.EventManager();

    /** @type {string} */
    this.sessionId = '';

    /** @type {number} */
    this.expiration = NaN;

    /** @type {!shaka.util.PublicPromise} */
    this.closed = new shaka.util.PublicPromise();

    /** @type {!shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap} */
    this.keyStatuses =
        new shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap();
  }
@param {WebKitMediaKeys} nativeMediaKeys
@param {string} sessionType