|
@@ -127,6 +127,17 @@ export default class JingleSessionPC extends JingleSession {
|
127
|
127
|
localJid,
|
128
|
128
|
remoteJid, connection, mediaConstraints, iceConfig, isInitiator);
|
129
|
129
|
|
|
130
|
+ /**
|
|
131
|
+ * The bridge session's identifier. One Jingle session can during
|
|
132
|
+ * it's lifetime participate in multiple bridge sessions managed by
|
|
133
|
+ * Jicofo. A new bridge session is started whenever Jicofo sends
|
|
134
|
+ * 'session-initiate' or 'transport-replace'.
|
|
135
|
+ *
|
|
136
|
+ * @type {?string}
|
|
137
|
+ * @private
|
|
138
|
+ */
|
|
139
|
+ this._bridgeSessionId = null;
|
|
140
|
+
|
130
|
141
|
/**
|
131
|
142
|
* Stores result of {@link window.performance.now()} at the time when
|
132
|
143
|
* ICE enters 'checking' state.
|
|
@@ -473,10 +484,6 @@ export default class JingleSessionPC extends JingleSession {
|
473
|
484
|
case 'failed':
|
474
|
485
|
this.room.eventEmitter.emit(
|
475
|
486
|
XMPPEvents.CONNECTION_ICE_FAILED, this);
|
476
|
|
- this.room.eventEmitter.emit(
|
477
|
|
- XMPPEvents.CONFERENCE_SETUP_FAILED,
|
478
|
|
- this,
|
479
|
|
- new Error('ICE fail'));
|
480
|
487
|
break;
|
481
|
488
|
}
|
482
|
489
|
};
|
|
@@ -631,6 +638,44 @@ export default class JingleSessionPC extends JingleSession {
|
631
|
638
|
cand, null, this.newJingleErrorHandler(cand), IQ_TIMEOUT);
|
632
|
639
|
}
|
633
|
640
|
|
|
641
|
+ /**
|
|
642
|
+ * Sends Jingle 'session-info' message which includes custom Jitsi Meet
|
|
643
|
+ * 'ice-state' element with the text value 'failed' to let Jicofo know
|
|
644
|
+ * that the ICE connection has entered the failed state. It can then
|
|
645
|
+ * choose to re-create JVB channels and send 'transport-replace' to
|
|
646
|
+ * retry the connection.
|
|
647
|
+ */
|
|
648
|
+ sendIceFailedNotification() {
|
|
649
|
+ const sessionInfo
|
|
650
|
+ = $iq({
|
|
651
|
+ to: this.remoteJid,
|
|
652
|
+ type: 'set' })
|
|
653
|
+ .c('jingle', { xmlns: 'urn:xmpp:jingle:1',
|
|
654
|
+ action: 'session-info',
|
|
655
|
+ initiator: this.initiatorJid,
|
|
656
|
+ sid: this.sid })
|
|
657
|
+ .c('ice-state', { xmlns: 'http://jitsi.org/protocol/focus' })
|
|
658
|
+ .t('failed')
|
|
659
|
+ .up();
|
|
660
|
+
|
|
661
|
+ this._bridgeSessionId
|
|
662
|
+ && sessionInfo.c(
|
|
663
|
+ 'bridge-session', {
|
|
664
|
+ xmlns: 'http://jitsi.org/protocol/focus',
|
|
665
|
+ id: this._bridgeSessionId
|
|
666
|
+ });
|
|
667
|
+
|
|
668
|
+ this.connection.sendIQ(
|
|
669
|
+ sessionInfo,
|
|
670
|
+ null,
|
|
671
|
+ this.newJingleErrorHandler(sessionInfo),
|
|
672
|
+ /*
|
|
673
|
+ * This message will be often sent when there are connectivity
|
|
674
|
+ * issues, so make it slightly longer than Prosody's default BOSH
|
|
675
|
+ * inactivity timeout of 60 seconds.
|
|
676
|
+ */ 65);
|
|
677
|
+ }
|
|
678
|
+
|
634
|
679
|
/**
|
635
|
680
|
* {@inheritDoc}
|
636
|
681
|
*/
|
|
@@ -913,6 +958,16 @@ export default class JingleSessionPC extends JingleSession {
|
913
|
958
|
const oldLocalSdp
|
914
|
959
|
= this.peerconnection.localDescription.sdp;
|
915
|
960
|
|
|
961
|
+ const bridgeSession
|
|
962
|
+ = $(jingleOfferAnswerIq)
|
|
963
|
+ .find('>bridge-session['
|
|
964
|
+ + 'xmlns="http://jitsi.org/protocol/focus"]');
|
|
965
|
+ const bridgeSessionId = bridgeSession.attr('id');
|
|
966
|
+
|
|
967
|
+ if (bridgeSessionId !== this._bridgeSessionId) {
|
|
968
|
+ this._bridgeSessionId = bridgeSessionId;
|
|
969
|
+ }
|
|
970
|
+
|
916
|
971
|
this._renegotiate(newRemoteSdp.raw)
|
917
|
972
|
.then(() => {
|
918
|
973
|
if (this.state === JingleSessionState.PENDING) {
|