_remoteICECandidates(listen) {
    const
      path = `${this._remotePath}/ice`;


    const event = 'child_added';
    if (listen) {
      // don't listen to ice candidates if pc is already up (renegotiation)
      DataSync.on(path, event, (snap) => {
        const candidate = snap.val();
        Log.d('PeerConnection~addIceCandidate', candidate);
        this.pc.addIceCandidate(new RTCIceCandidate(candidate));
      });
    } else {
      DataSync.off(path, event);
    }
  }
/**
   * Toggle ICE Candidates discovery
   * @access private
   * @param {boolean} listen Indicates if we should listen to new ICE candidates
   */
Toggle ICE Candidates discovery
@access private
@param {boolean} listen Indicates if we should listen to new ICE candidates
Toggle ICE Candidates discovery @access private @param { boolean } listen Indicates if we should listen to new ICE candidates
_remoteICECandidates(listen) {
    const
      path = `${this._remotePath}/ice`;
    const event = 'child_added';
    if (listen) {
      DataSync.on(path, event, (snap) => {
        const candidate = snap.val();
        Log.d('PeerConnection~addIceCandidate', candidate);
        this.pc.addIceCandidate(new RTCIceCandidate(candidate));
      });
    } else {
      DataSync.off(path, event);
    }
  }
_remoteICECandidates ( listen ) { const path = ` ${ this . _remotePath } ` ; const event = 'child_added' ; if ( listen ) { DataSync . on ( path , event , ( snap ) => { const candidate = snap . val ( ) ; Log . d ( 'PeerConnection~addIceCandidate' , candidate ) ; this . pc . addIceCandidate ( new RTCIceCandidate ( candidate ) ) ; } ) ; } else { DataSync . off ( path , event ) ; } }
Toggle ICE Candidates discovery
 @access private
 @param {boolean} listen Indicates if we should listen to new ICE candidates
Toggle ICE Candidates discovery @access private @param { boolean } listen Indicates if we should listen to new ICE candidates
// don't listen to ice candidates if pc is already up (renegotiation)