code: function() {
            var newState = _peerConnection.signalingState;
  
            if (newState && newState !== _state) {
              _state = newState;
              OT.debug('PeerConnection.stateChange: ' + _state);
  
              switch(_state) {
                case 'closed':
                  tearDownPeerConnection();
                  break;
              }
            }
          }
docs: Private methods