|
@@ -339,6 +339,30 @@ JingleSessionPC.prototype.sendAnswer = function (success, failure) {
|
339
|
339
|
|
340
|
340
|
JingleSessionPC.prototype.createdAnswer = function (sdp, success, failure) {
|
341
|
341
|
//logger.log('createAnswer callback');
|
|
342
|
+
|
|
343
|
+ // XXX Videobridge is the (SDP) offerer and WebRTC (e.g. Chrome) is the
|
|
344
|
+ // answerer (as orchestrated by Jicofo). In accord with
|
|
345
|
+ // http://tools.ietf.org/html/rfc5245#section-5.2 and because both peers
|
|
346
|
+ // are ICE FULL agents, Videobridge will take on the controlling role and
|
|
347
|
+ // WebRTC will take on the controlled role. In accord with
|
|
348
|
+ // https://tools.ietf.org/html/rfc5763#section-5, Videobridge will use the
|
|
349
|
+ // setup attribute value of setup:actpass and WebRTC will be allowed to
|
|
350
|
+ // choose either the setup attribute value of setup:active or
|
|
351
|
+ // setup:passive. Chrome will by default choose setup:active because it is
|
|
352
|
+ // RECOMMENDED by the respective RFC since setup:passive adds additional
|
|
353
|
+ // latency. The case of setup:active allows WebRTC to send a DTLS
|
|
354
|
+ // ClientHello as soon as an ICE connectivity check of its succeeds.
|
|
355
|
+ // Unfortunately, Videobridge will be unable to respond immediately because
|
|
356
|
+ // may not have WebRTC's answer or may have not completed the ICE
|
|
357
|
+ // connectivity establishment. Even more unfortunate is that in the
|
|
358
|
+ // described scenario Chrome's DTLS implementation will insist on
|
|
359
|
+ // retransmitting its ClientHello after a second (the time is in accord
|
|
360
|
+ // with the respective RFC) and will thus cause the whole connection
|
|
361
|
+ // establishment to exceed at least 1 second. To work around Chrome's
|
|
362
|
+ // idiosyncracy, don't allow it to send a ClientHello i.e. change its
|
|
363
|
+ // default choice of setup:active to setup:passive.
|
|
364
|
+ sdp.sdp = sdp.sdp.replace(/a=setup:active/g, 'a=setup:passive');
|
|
365
|
+
|
342
|
366
|
var self = this;
|
343
|
367
|
this.localSDP = new SDP(sdp.sdp);
|
344
|
368
|
var sendJingle = function (ssrcs) {
|