stopCurrentMirroring() {
    if (!this.initialized_) {
      return Promise.reject('Not initialized');
    }
    return this.cleanup_().then(hadSession => {
      if (hadSession) this.recordMirrorSessionEnded();

      return hadSession;
    });
  }
/**
   * @return {!Promise<boolean>} Fulfilled with true if there was a session
   *     and it was stopped, and with false if there is no session to stop.
   */
@return {!Promise} Fulfilled with true if there was a session
and it was stopped, and with false if there is no session to stop.
@return { !Promise } Fulfilled with true if there was a session and it was stopped and with false if there is no session to stop .
stopCurrentMirroring() {
    if (!this.initialized_) {
      return Promise.reject('Not initialized');
    }
    return this.cleanup_().then(hadSession => {
      if (hadSession) this.recordMirrorSessionEnded();
      return hadSession;
    });
  }
stopCurrentMirroring ( ) { if ( ! this . initialized_ ) { return Promise . reject ( 'Not initialized' ) ; } return this . cleanup_ ( ) . then ( hadSession => { if ( hadSession ) this . recordMirrorSessionEnded ( ) ; return hadSession ; } ) ; }
@return {!Promise<boolean>} Fulfilled with true if there was a session
     and it was stopped, and with false if there is no session to stop.
@return { !Promise<boolean > } Fulfilled with true if there was a session and it was stopped and with false if there is no session to stop .