destroy() {

    // Unbind and pending work in the transport
    this._transport.cleanup();

    // Remove the events bound to this instance
    this.off();

    if (isiPad(this._env.navigator.userAgent) || isiPhone(this._env.navigator.userAgent)) {
      this._env.removeEventListener('pagehide', this._pageLeaveHandler);
    } else {
      this._env.removeEventListener('beforeunload', this._pageLeaveHandler);
    }
  }
/**
   * Destroys the messaging channel for the PBSMessageAPI so that the event handler
   * that traps messages does not exist continually. Removes all bound events
   * from the underlying player element
   */
Destroys the messaging channel for the PBSMessageAPI so that the event handler
that traps messages does not exist continually. Removes all bound events
from the underlying player element
Destroys the messaging channel for the PBSMessageAPI so that the event handler that traps messages does not exist continually . Removes all bound events from the underlying player element
destroy() {
    this._transport.cleanup();
    this.off();
    if (isiPad(this._env.navigator.userAgent) || isiPhone(this._env.navigator.userAgent)) {
      this._env.removeEventListener('pagehide', this._pageLeaveHandler);
    } else {
      this._env.removeEventListener('beforeunload', this._pageLeaveHandler);
    }
  }
destroy ( ) { this . _transport . cleanup ( ) ; this . off ( ) ; if ( isiPad ( this . _env . navigator . userAgent ) || isiPhone ( this . _env . navigator . userAgent ) ) { this . _env . removeEventListener ( 'pagehide' , this . _pageLeaveHandler ) ; } else { this . _env . removeEventListener ( 'beforeunload' , this . _pageLeaveHandler ) ; } }
Destroys the messaging channel for the PBSMessageAPI so that the event handler
 that traps messages does not exist continually.
Destroys the messaging channel for the PBSMessageAPI so that the event handler that traps messages does not exist continually .
// Unbind and pending work in the transport // Remove the events bound to this instance