_sendSdpToRemote(newDesc) {
    // Log.d('PeerConnection~_sendSdpToRemote#localSDP', this.pc.localDescription.sdp);
    const remoteUserId = this.remote.to ? this.remote.to : this.remote.from;
    Device.get(remoteUserId, this.remote.device)
      .then((remoteDevice) => {
        const sdpOffer = newDesc.sdp; // 1109 - Didn't use pc.localDescription to set bitrate on SDP
        let newSdp = sdpOffer;
        const local = /Chrome\/([0-9]+)/.exec(navigator.userAgent);
        const remote = /Chrome\/([0-9]+)/.exec(remoteDevice.userAgent);
        if (navigator.userAgent.indexOf('Chrome') !== -1
          && navigator.userAgent.indexOf('Android') !== -1
          && remoteDevice.userAgent.indexOf('Safari') !== -1
          && local[1] <= 64) {
          if (local[1] <= 60) {
            newSdp = newSdp.replace(/;profile-level-id=([a-z0-9]+)/, '');
          } else {
            newSdp = newSdp.replace('42001f', '42e01f');
          }
        }
        if (navigator.userAgent.indexOf('Safari') !== -1
          && remoteDevice.userAgent.indexOf('Chrome') !== -1
          && remoteDevice.userAgent.indexOf('Android') !== -1
          && remote[1] <= 64) {
          if (remote[1] <= 60) {
            newSdp = newSdp.replace(/;profile-level-id=([a-z0-9]+)/, '');
          } else {
            newSdp = newSdp.replace('42e01f', '42001f');
          }
        }
        Log.d(`PeerConnection~_sendSdpToRemote#SDP sent to remote ${newSdp}`);
        const descriptionChanged = {
          sdp: newSdp,
          type: newDesc.type
        };
        DataSync.update(`${this._localPath}/sdp`, _toJSON(descriptionChanged));
      });
  }
/**
   * Send SDP offer to the remote via DataSync
   * @private
   * @param newDesc
   */
Send SDP offer to the remote via DataSync
@private
@param newDesc
Send SDP offer to the remote via DataSync @private @param newDesc
_sendSdpToRemote(newDesc) {
    const remoteUserId = this.remote.to ? this.remote.to : this.remote.from;
    Device.get(remoteUserId, this.remote.device)
      .then((remoteDevice) => {
        const sdpOffer = newDesc.sdp; 
        let newSdp = sdpOffer;
        const local = /Chrome\/([0-9]+)/.exec(navigator.userAgent);
        const remote = /Chrome\/([0-9]+)/.exec(remoteDevice.userAgent);
        if (navigator.userAgent.indexOf('Chrome') !== -1
          && navigator.userAgent.indexOf('Android') !== -1
          && remoteDevice.userAgent.indexOf('Safari') !== -1
          && local[1] <= 64) {
          if (local[1] <= 60) {
            newSdp = newSdp.replace(/;profile-level-id=([a-z0-9]+)/, '');
          } else {
            newSdp = newSdp.replace('42001f', '42e01f');
          }
        }
        if (navigator.userAgent.indexOf('Safari') !== -1
          && remoteDevice.userAgent.indexOf('Chrome') !== -1
          && remoteDevice.userAgent.indexOf('Android') !== -1
          && remote[1] <= 64) {
          if (remote[1] <= 60) {
            newSdp = newSdp.replace(/;profile-level-id=([a-z0-9]+)/, '');
          } else {
            newSdp = newSdp.replace('42e01f', '42001f');
          }
        }
        Log.d(`PeerConnection~_sendSdpToRemote#SDP sent to remote ${newSdp}`);
        const descriptionChanged = {
          sdp: newSdp,
          type: newDesc.type
        };
        DataSync.update(`${this._localPath}/sdp`, _toJSON(descriptionChanged));
      });
  }
_sendSdpToRemote ( newDesc ) { const remoteUserId = this . remote . to ? this . remote . to : this . remote . from ; Device . get ( remoteUserId , this . remote . device ) . then ( ( remoteDevice ) => { const sdpOffer = newDesc . sdp ; let newSdp = sdpOffer ; const local = / Chrome\/([0-9]+) / . exec ( navigator . userAgent ) ; const remote = / Chrome\/([0-9]+) / . exec ( remoteDevice . userAgent ) ; if ( navigator . userAgent . indexOf ( 'Chrome' ) !== - 1 && navigator . userAgent . indexOf ( 'Android' ) !== - 1 && remoteDevice . userAgent . indexOf ( 'Safari' ) !== - 1 && local [ 1 ] <= 64 ) { if ( local [ 1 ] <= 60 ) { newSdp = newSdp . replace ( / ;profile-level-id=([a-z0-9]+) / , '' ) ; } else { newSdp = newSdp . replace ( '42001f' , '42e01f' ) ; } } if ( navigator . userAgent . indexOf ( 'Safari' ) !== - 1 && remoteDevice . userAgent . indexOf ( 'Chrome' ) !== - 1 && remoteDevice . userAgent . indexOf ( 'Android' ) !== - 1 && remote [ 1 ] <= 64 ) { if ( remote [ 1 ] <= 60 ) { newSdp = newSdp . replace ( / ;profile-level-id=([a-z0-9]+) / , '' ) ; } else { newSdp = newSdp . replace ( '42e01f' , '42001f' ) ; } } Log . d ( ` ${ newSdp } ` ) ; const descriptionChanged = { sdp : newSdp , type : newDesc . type } ; DataSync . update ( ` ${ this . _localPath } ` , _toJSON ( descriptionChanged ) ) ; } ) ; }
Send SDP offer to the remote via DataSync
 @private
 @param newDesc
Send SDP offer to the remote via DataSync @private @param newDesc
// Log.d('PeerConnection~_sendSdpToRemote#localSDP', this.pc.localDescription.sdp); // 1109 - Didn't use pc.localDescription to set bitrate on SDP