会话重新初始化问题

时间:2017-06-09 18:22:16

标签: webrtc

RTCMultiConnection v3(Muaz Khan)

场景:

  1. A打开与B
  2. 的连接
  3. B加入与A
  4. 的连接

    注意:上面的场景是完美的

    1. A打开与C
    2. 的连接
    3. C加入与A
    4. 的连接

      生成错误的函数:

          this.addRemoteSdp = function(remoteSdp, cb) {
              console.log(remoteSdp, "before")
              remoteSdp.sdp = connection.processSdp(remoteSdp.sdp);
              console.log(remoteSdp, "after")
              peer.setRemoteDescription(new RTCSessionDescription(remoteSdp), cb || function() {}, function(error) {
                  if (!!connection.enableLogs) {
                      console.error(JSON.stringify(error, null, '\t'), '\n', remoteSdp.type, remoteSdp.sdp);
                  }
              });
          };
      

      函数生成的错误:

      RTCMultiConnection.js:2669 {} 
       answer v=0
      o=- 290917982199254640 2 IN IP4 127.0.0.1
      s=-
      t=0 0
      a=group:BUNDLE data
      a=msid-semantic: WMS
      m=application 9 DTLS/SCTP 5000
      c=IN IP4 0.0.0.0
      a=ice-ufrag:J7UX
      a=ice-pwd:ED+zJrLHxUmKjqquaYENgvS5
      a=fingerprint:sha-256 33:A9:C3:0D:F6:E6:B6:81:4A:5C:FF:C6:A0:40:93:1F:07:9A:03:9B:7E:71:8F:BC:5F:0A:F8:73:58:1A:0C:7A
      a=setup:active
      a=mid:data
      a=sctpmap:5000 webrtc-datachannel 1024
      

0 个答案:

没有答案