From fac989a94d1352760cd7e88a87941cd2b1c339bb Mon Sep 17 00:00:00 2001
From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com>
Date: Fri, 11 Oct 2024 11:52:10 -0400
Subject: [PATCH] fix(JingleSession) Remove ice restart option and
functionality. (#2586)
---
JitsiConference.js | 2 -
JitsiConferenceEventManager.js | 24 --
modules/connectivity/IceFailedHandling.js | 53 ++--
.../connectivity/IceFailedHandling.spec.js | 97 ++------
modules/proxyconnection/ProxyConnectionPC.js | 3 +-
modules/xmpp/ChatRoom.js | 15 --
modules/xmpp/JingleSessionPC.js | 234 +-----------------
modules/xmpp/strophe.jingle.js | 41 +--
service/statistics/AnalyticsEvents.spec.ts | 6 -
service/statistics/AnalyticsEvents.ts | 14 --
service/xmpp/XMPPEvents.spec.ts | 2 -
service/xmpp/XMPPEvents.ts | 12 -
types/hand-crafted/JitsiConference.d.ts | 1 -
types/hand-crafted/modules/xmpp/ChatRoom.d.ts | 1 -
.../modules/xmpp/JingleSessionPC.d.ts | 4 -
.../service/statistics/AnalyticsEvents.d.ts | 2 -
.../hand-crafted/service/xmpp/XMPPEvents.d.ts | 2 -
17 files changed, 41 insertions(+), 472 deletions(-)
diff --git a/JitsiConference.js b/JitsiConference.js
index ce09095cc5..c871287bf4 100644
--- a/JitsiConference.js
+++ b/JitsiConference.js
@@ -106,8 +106,6 @@ function _getCodecMimeType(codec) {
* @param {number} [options.config.avgRtpStatsN=15] how many samples are to be
* collected by {@link AvgRTPStatsReporter}, before arithmetic mean is
* calculated and submitted to the analytics module.
- * @param {boolean} [options.config.enableIceRestart=false] - enables the ICE
- * restart logic.
* @param {boolean} [options.config.p2p.enabled] when set to true
* the peer to peer mode will be enabled. It means that when there are only 2
* participants in the conference an attempt to make direct connection will be
diff --git a/JitsiConferenceEventManager.js b/JitsiConferenceEventManager.js
index f4924c464a..3fc16f2079 100644
--- a/JitsiConferenceEventManager.js
+++ b/JitsiConferenceEventManager.js
@@ -42,19 +42,6 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
this.chatRoomForwarder = new EventEmitterForwarder(chatRoom,
this.conference.eventEmitter);
- chatRoom.addListener(XMPPEvents.ICE_RESTARTING, jingleSession => {
- if (!jingleSession.isP2P) {
- // If using DataChannel as bridge channel, it must be closed
- // before ICE restart, otherwise Chrome will not trigger "opened"
- // event for the channel established with the new bridge.
- // TODO: This may be bypassed when using a WebSocket as bridge
- // channel.
- conference.rtc.closeBridgeChannel();
- }
-
- // else: there are no DataChannels in P2P session (at least for now)
- });
-
chatRoom.addListener(XMPPEvents.PARTICIPANT_FEATURES_CHANGED, (from, features) => {
const participant = conference.getParticipantById(Strophe.getResourceFromJid(from));
@@ -64,17 +51,6 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
}
});
- chatRoom.addListener(
- XMPPEvents.ICE_RESTART_SUCCESS,
- (jingleSession, offerIq) => {
- // The JVB data chanel needs to be reopened in case the conference
- // has been moved to a new bridge.
- !jingleSession.isP2P
- && conference._setBridgeChannel(
- offerIq, jingleSession.peerconnection);
- });
-
-
chatRoom.addListener(XMPPEvents.AUDIO_MUTED_BY_FOCUS,
actor => {
// TODO: Add a way to differentiate between commands which caused
diff --git a/modules/connectivity/IceFailedHandling.js b/modules/connectivity/IceFailedHandling.js
index 666a0b3b7e..4aff8a94ae 100644
--- a/modules/connectivity/IceFailedHandling.js
+++ b/modules/connectivity/IceFailedHandling.js
@@ -8,13 +8,10 @@ const logger = getLogger(__filename);
/**
* This class deals with shenanigans around JVB media session's ICE failed status handling.
*
- * If ICE restarts are NOT explicitly enabled by the {@code enableIceRestart} config option, then the conference will
- * delay emitting the {@JitsiConferenceErrors.ICE_FAILED} event by 15 seconds. If the network info module reports
- * the internet offline status then the time will start counting after the internet comes back online.
- *
- * If ICE restart are enabled, then a delayed ICE failed notification to Jicofo will be sent, only if the ICE connection
- * does not recover soon after or before the XMPP connection is restored (if it was ever broken). If ICE fails while
- * the XMPP connection is not broken then the notifications will be sent after 2 seconds delay.
+ * If ICE connection is not re-established within 2 secs after the internet comes back online, the client will initiate
+ * a session restart via 'session-terminate'. This results in Jicofo re-inviting the participant into the conference by
+ * recreating the jvb media session so that there is minimla disruption to the user by default. However, if the
+ * 'enableForcedReload' option is set in config.js, the conference will be forcefully reloaded.
*/
export default class IceFailedHandling {
/**
@@ -36,23 +33,15 @@ export default class IceFailedHandling {
return;
}
- const { enableForcedReload, enableIceRestart } = this._conference.options.config;
- const explicitlyDisabled = typeof enableIceRestart !== 'undefined' && !enableIceRestart;
- const supportsRestartByTerminate = this._conference.room.supportsRestartByTerminate();
- const useTerminateForRestart = supportsRestartByTerminate && !enableIceRestart;
-
- logger.info('ICE failed,'
- + ` enableForcedReload: ${enableForcedReload},`
- + ` enableIceRestart: ${enableIceRestart},`
- + ` supports restart by terminate: ${supportsRestartByTerminate}`);
+ const { enableForcedReload } = this._conference.options.config;
- if (explicitlyDisabled || (!enableIceRestart && !supportsRestartByTerminate) || enableForcedReload) {
- logger.info('ICE failed, but ICE restarts are disabled');
- const reason = enableForcedReload
- ? JitsiConferenceErrors.CONFERENCE_RESTARTED
- : JitsiConferenceErrors.ICE_FAILED;
+ logger.info(`ICE failed, enableForcedReload: ${enableForcedReload}`);
- this._conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED, reason);
+ if (enableForcedReload) {
+ logger.info('ICE failed, force reloading the conference');
+ this._conference.eventEmitter.emit(
+ JitsiConferenceEvents.CONFERENCE_FAILED,
+ JitsiConferenceErrors.CONFERENCE_RESTARTED);
return;
}
@@ -65,19 +54,13 @@ export default class IceFailedHandling {
} else if (jvbConnIceState === 'connected') {
logger.info('ICE connection restored - not sending ICE failed');
} else {
- logger.info('Sending ICE failed - the connection did not recover, '
- + `ICE state: ${jvbConnIceState}, `
- + `use 'session-terminate': ${useTerminateForRestart}`);
- if (useTerminateForRestart) {
- this._conference._stopJvbSession({
- reason: 'connectivity-error',
- reasonDescription: 'ICE FAILED',
- requestRestart: true,
- sendSessionTerminate: true
- });
- } else {
- this._conference.jvbJingleSession.sendIceFailedNotification();
- }
+ logger.info(`Sending ICE failed - the connection did not recover, ICE state: ${jvbConnIceState}`);
+ this._conference._stopJvbSession({
+ reason: 'connectivity-error',
+ reasonDescription: 'ICE FAILED',
+ requestRestart: true,
+ sendSessionTerminate: true
+ });
}
}
diff --git a/modules/connectivity/IceFailedHandling.spec.js b/modules/connectivity/IceFailedHandling.spec.js
index e46fd5266d..c0aee14bdf 100644
--- a/modules/connectivity/IceFailedHandling.spec.js
+++ b/modules/connectivity/IceFailedHandling.spec.js
@@ -36,9 +36,7 @@ describe('IceFailedHandling', () => {
// eslint-disable-next-line no-empty-function
emit: () => { }
};
- mockConference.room = {
- supportsRestartByTerminate: () => false
- };
+ mockConference.room = {};
mockConference.xmpp = {
ping: () => Promise.resolve()
};
@@ -49,83 +47,11 @@ describe('IceFailedHandling', () => {
jasmine.clock().uninstall();
});
- describe('when ICE restarts are disabled', () => {
- beforeEach(() => {
- mockConference.options.config.enableIceRestart = false;
- });
- it('emits ICE failed with 2 seconds delay after XMPP ping comes through', () => {
- iceFailedHandling.start();
-
- return nextTick() // tick for ping
- .then(() => {
- expect(emitEventSpy).not.toHaveBeenCalled();
-
- return nextTick(2500); // tick for the 2 sec ice timeout
- })
- .then(() => {
- expect(emitEventSpy).toHaveBeenCalled();
- });
- });
- it('cancel method cancels the ICE failed event', () => {
- iceFailedHandling.start();
-
- return nextTick(1000) // tick for ping
- .then(() => {
- expect(emitEventSpy).not.toHaveBeenCalled();
- iceFailedHandling.cancel();
-
- return nextTick(2500); // tick for ice timeout
- })
- .then(() => {
- expect(emitEventSpy).not.toHaveBeenCalled();
- });
- });
- });
- describe('when ICE restart are enabled', () => {
- let sendIceFailedSpy;
-
- beforeEach(() => {
- mockConference.options.config.enableIceRestart = true;
- mockConference.jvbJingleSession = {
- getIceConnectionState: () => 'failed',
- // eslint-disable-next-line no-empty-function
- sendIceFailedNotification: () => { }
- };
- sendIceFailedSpy = spyOn(mockConference.jvbJingleSession, 'sendIceFailedNotification');
- });
- it('send ICE failed notification to Jicofo', () => {
- iceFailedHandling.start();
-
- return nextTick() // tick for ping
- .then(() => nextTick(2500)) // tick for ice timeout
- .then(() => {
- expect(sendIceFailedSpy).toHaveBeenCalled();
- });
- });
- it('not send ICE failed notification to Jicofo if canceled', () => {
- iceFailedHandling.start();
-
- // first it send ping which is async - need next tick
- return nextTick(1000)
- .then(() => {
- expect(sendIceFailedSpy).not.toHaveBeenCalled();
- iceFailedHandling.cancel();
-
- return nextTick(3000); // tick for ice timeout
- })
- .then(() => {
- expect(sendIceFailedSpy).not.toHaveBeenCalled();
- });
- });
- });
describe('if Jingle session restarts are supported', () => {
let sendSessionTerminateSpy;
beforeEach(() => {
- mockConference.options.config.enableIceRestart = undefined;
- mockConference.room = {
- supportsRestartByTerminate: () => true
- };
+ mockConference.room = {};
mockConference.jvbJingleSession = {
getIceConnectionState: () => 'failed',
// eslint-disable-next-line no-empty-function
@@ -148,15 +74,26 @@ describe('IceFailedHandling', () => {
});
});
});
+ it('cancel method cancels the call to terminate session', () => {
+ iceFailedHandling.start();
+
+ return nextTick(1000) // tick for ping
+ .then(() => {
+ expect(sendSessionTerminateSpy).not.toHaveBeenCalled();
+ iceFailedHandling.cancel();
+
+ return nextTick(2500); // tick for ice timeout
+ })
+ .then(() => {
+ expect(sendSessionTerminateSpy).not.toHaveBeenCalled();
+ });
+ });
});
describe('when forced reloads are enabled', () => {
beforeEach(() => {
- mockConference.options.config.enableIceRestart = undefined;
mockConference.options.config.enableForcedReload = true;
- mockConference.room = {
- supportsRestartByTerminate: () => true
- };
+ mockConference.room = {};
});
it('emits conference restarted when force reloads are enabled', () => {
diff --git a/modules/proxyconnection/ProxyConnectionPC.js b/modules/proxyconnection/ProxyConnectionPC.js
index 3030af31b5..79d765d0e1 100644
--- a/modules/proxyconnection/ProxyConnectionPC.js
+++ b/modules/proxyconnection/ProxyConnectionPC.js
@@ -225,8 +225,7 @@ export default class ProxyConnectionPC {
connectionTimes: [],
eventEmitter: { emit: emitter },
removeEventListener: () => { /* no op */ },
- removePresenceListener: () => { /* no-op */ },
- supportsRestartByTerminate: () => false
+ removePresenceListener: () => { /* no-op */ }
};
/**
diff --git a/modules/xmpp/ChatRoom.js b/modules/xmpp/ChatRoom.js
index 480fa63883..e6f3b93844 100644
--- a/modules/xmpp/ChatRoom.js
+++ b/modules/xmpp/ChatRoom.js
@@ -816,13 +816,6 @@ export default class ChatRoom extends Listenable {
}
this.eventEmitter.emit(XMPPEvents.CONFERENCE_PROPERTIES_CHANGED, properties);
-
- // Log if Jicofo supports restart by terminate only once. This conference property does not change
- // during the call.
- if (typeof this.restartByTerminateSupported === 'undefined') {
- this.restartByTerminateSupported = properties['support-terminate-restart'] === 'true';
- logger.info(`Jicofo supports restart by terminate: ${this.supportsRestartByTerminate()}`);
- }
}
break;
case 'transcription-status': {
@@ -913,14 +906,6 @@ export default class ChatRoom extends Listenable {
this.participantPropertyListener = listener;
}
- /**
- * Checks if Jicofo supports restarting Jingle session after 'session-terminate'.
- * @returns {boolean}
- */
- supportsRestartByTerminate() {
- return this.restartByTerminateSupported;
- }
-
/**
*
* @param node
diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js
index af8411182e..4ee4dcf5a9 100644
--- a/modules/xmpp/JingleSessionPC.js
+++ b/modules/xmpp/JingleSessionPC.js
@@ -197,7 +197,7 @@ export default class JingleSessionPC extends JingleSession {
* The bridge session's identifier. One Jingle session can during
* it's lifetime participate in multiple bridge sessions managed by
* Jicofo. A new bridge session is started whenever Jicofo sends
- * 'session-initiate' or 'transport-replace'.
+ * 'session-initiate'.
*
* @type {?string}
* @private
@@ -277,8 +277,7 @@ export default class JingleSessionPC extends JingleSession {
/**
* Marks that ICE gathering duration has been reported already. That
- * prevents reporting it again, after eventual 'transport-replace' (JVB
- * conference migration/ICE restart).
+ * prevents reporting it again.
* @type {boolean}
* @private
*/
@@ -544,13 +543,7 @@ export default class JingleSessionPC extends JingleSession {
// media connection to the bridge has been restored after an ICE failure by using session-terminate.
if (this.peerconnection.signalingState === 'stable') {
isStable = true;
- const usesTerminateForRestart = !this.options.enableIceRestart
- && this.room.supportsRestartByTerminate();
-
- if (this.isReconnect || usesTerminateForRestart) {
- this.room.eventEmitter.emit(
- XMPPEvents.CONNECTION_RESTORED, this);
- }
+ this.room.eventEmitter.emit(XMPPEvents.CONNECTION_RESTORED, this);
}
// Add a workaround for an issue on chrome in Unified plan when the local endpoint is the offerer.
@@ -817,45 +810,6 @@ export default class JingleSessionPC extends JingleSession {
cand, null, this.newJingleErrorHandler(cand), IQ_TIMEOUT);
}
- /**
- * Sends Jingle 'session-info' message which includes custom Jitsi Meet
- * 'ice-state' element with the text value 'failed' to let Jicofo know
- * that the ICE connection has entered the failed state. It can then
- * choose to re-create JVB channels and send 'transport-replace' to
- * retry the connection.
- */
- sendIceFailedNotification() {
- const sessionInfo
- = $iq({
- to: this.remoteJid,
- type: 'set' })
- .c('jingle', { xmlns: 'urn:xmpp:jingle:1',
- action: 'session-info',
- initiator: this.initiatorJid,
- sid: this.sid })
- .c('ice-state', { xmlns: 'http://jitsi.org/protocol/focus' })
- .t('failed')
- .up();
-
- this._bridgeSessionId
- && sessionInfo.c(
- 'bridge-session', {
- xmlns: 'http://jitsi.org/protocol/focus',
- id: this._bridgeSessionId
- });
-
- this.connection.sendIQ2(
- sessionInfo, {
- /*
- * This message will be often sent when there are connectivity
- * issues, so make it slightly longer than Prosody's default BOSH
- * inactivity timeout of 60 seconds.
- */
- timeout: 65
- })
- .catch(this.newJingleErrorHandler(sessionInfo));
- }
-
/**
* {@inheritDoc}
*/
@@ -1233,111 +1187,6 @@ export default class JingleSessionPC extends JingleSession {
}
}
- /* eslint-enable max-params */
-
- /**
- * Although it states "replace transport" it does accept full Jingle offer
- * which should contain new ICE transport details.
- * @param jingleOfferElem an element Jingle IQ that contains new offer and
- * transport info.
- * @param success callback called when we succeed to accept new offer.
- * @param failure function(error) called when we fail to accept new offer.
- */
- replaceTransport(jingleOfferElem, success, failure) {
- if (this.options.enableForcedReload) {
- const sdp = new SDP(this.peerconnection.localDescription.sdp);
-
- this.sendTransportAccept(sdp, success, failure);
- this.room.eventEmitter.emit(XMPPEvents.CONNECTION_RESTARTED, this);
-
- return;
- }
- this.room.eventEmitter.emit(XMPPEvents.ICE_RESTARTING, this);
-
- // We need to first reject the 'data' section to have the SCTP stack
- // cleaned up to signal the known data channel is now invalid. After
- // that the original offer is set to have the SCTP connection
- // established with the new bridge.
- const originalOffer = jingleOfferElem.clone();
-
- jingleOfferElem
- .find('>content[name=\'data\']')
- .attr('senders', 'rejected');
-
- // Remove all remote sources in order to reset the client's state
- // for the remote MediaStreams. When a conference is moved to
- // another bridge it will start streaming with a sequence number
- // that is not in sync with the most recently seen by the client.
- // The symptoms include frozen or black video and lots of "failed to
- // unprotect SRTP packets" in Chrome logs.
- jingleOfferElem
- .find('>content>description>source')
- .remove();
- jingleOfferElem
- .find('>content>description>ssrc-group')
- .remove();
-
- // On the JVB it's not a real ICE restart and all layers are re-initialized from scratch as Jicofo does
- // the restart by re-allocating new channels. Chrome (or WebRTC stack) needs to have the DTLS transport layer
- // reset to start a new handshake with fresh DTLS transport on the bridge. Make it think that the DTLS
- // fingerprint has changed by setting an all zeros key.
- const newFingerprint = jingleOfferElem.find('>content>transport>fingerprint');
-
- newFingerprint.attr('hash', 'sha-1');
- newFingerprint.text('00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00');
-
- const workFunction = finishedCallback => {
- // First set an offer with a rejected 'data' section
- this.setOfferAnswerCycle(
- jingleOfferElem,
- () => {
- // Now set the original offer(with the 'data' section)
- this.setOfferAnswerCycle(
- originalOffer,
- () => {
- const localSDP = new SDP(this.peerconnection.localDescription.sdp);
-
- if (typeof this.options.channelLastN === 'number' && this.options.channelLastN >= 0) {
- localSDP.initialLastN = this.options.channelLastN;
- }
-
- this.sendTransportAccept(localSDP, success, failure);
-
- this.room.eventEmitter.emit(
- XMPPEvents.ICE_RESTART_SUCCESS,
- this,
- originalOffer);
-
- finishedCallback();
- }, error => finishedCallback(error)
- );
- }, error => finishedCallback(error)
- );
- };
-
- logger.debug(`${this} Queued ICE restart task`);
-
- // Queue and execute
- this.modificationQueue.push(
- workFunction,
- error => {
- if (error) {
- if (error instanceof ClearedQueueError) {
- // The session might have been terminated before the task was executed, making it obsolete.
- logger.debug(`${this} ICE restart task aborted: session terminated`);
- success();
-
- return;
- }
- logger.error(`${this} ICE restart task failed: ${error}`);
- failure(error);
- } else {
- logger.debug(`${this} ICE restart task done`);
- success();
- }
- });
- }
-
/**
* Sends Jingle 'session-accept' message.
* @param {function()} success callback called when we receive 'RESULT'
@@ -1474,83 +1323,6 @@ export default class JingleSessionPC extends JingleSession {
}
}
- /**
- * Sends Jingle 'transport-accept' message which is a response to
- * 'transport-replace'.
- * @param localSDP the 'SDP' object with local session description
- * @param success callback called when we receive 'RESULT' packet for
- * 'transport-replace'
- * @param failure function(error) called when we receive an error response
- * or when the request has timed out.
- * @private
- */
- sendTransportAccept(localSDP, success, failure) {
- const transportAccept = $iq({ to: this.remoteJid,
- type: 'set' })
- .c('jingle', {
- xmlns: 'urn:xmpp:jingle:1',
- action: 'transport-accept',
- initiator: this.initiatorJid,
- sid: this.sid
- });
-
- localSDP.media.forEach((medialines, idx) => {
- const mline = SDPUtil.parseMLine(medialines.split('\r\n')[0]);
-
- transportAccept.c('content',
- {
- creator:
- this.initiatorJid === this.localJid
- ? 'initiator'
- : 'responder',
- name: mline.media
- }
- );
- localSDP.transportToJingle(idx, transportAccept);
- transportAccept.up();
- });
-
- logger.info(`${this} Sending transport-accept`);
- logger.debug(transportAccept.tree());
-
- this.connection.sendIQ(transportAccept,
- success,
- this.newJingleErrorHandler(transportAccept, failure),
- IQ_TIMEOUT);
- }
-
- /**
- * Sends Jingle 'transport-reject' message which is a response to
- * 'transport-replace'.
- * @param success callback called when we receive 'RESULT' packet for
- * 'transport-replace'
- * @param failure function(error) called when we receive an error response
- * or when the request has timed out.
- *
- * FIXME method should be marked as private, but there's some spaghetti that
- * needs to be fixed prior doing that
- */
- sendTransportReject(success, failure) {
- // Send 'transport-reject', so that the focus will
- // know that we've failed
- const transportReject = $iq({ to: this.remoteJid,
- type: 'set' })
- .c('jingle', {
- xmlns: 'urn:xmpp:jingle:1',
- action: 'transport-reject',
- initiator: this.initiatorJid,
- sid: this.sid
- });
-
- logger.info(`${this} Sending 'transport-reject'`);
- logger.debug(transportReject.tree());
-
- this.connection.sendIQ(transportReject,
- success,
- this.newJingleErrorHandler(transportReject, failure),
- IQ_TIMEOUT);
- }
-
/**
* Sets the resolution constraint on the local camera track.
* @param {number} maxFrameHeight - The user preferred max frame height.
diff --git a/modules/xmpp/strophe.jingle.js b/modules/xmpp/strophe.jingle.js
index 5b22215214..8df59499a7 100644
--- a/modules/xmpp/strophe.jingle.js
+++ b/modules/xmpp/strophe.jingle.js
@@ -4,13 +4,7 @@ import { cloneDeep } from 'lodash-es';
import { $iq, Strophe } from 'strophe.js';
import { MediaType } from '../../service/RTC/MediaType';
-import {
- ACTION_JINGLE_TR_RECEIVED,
- ACTION_JINGLE_TR_SUCCESS,
- createJingleEvent
-} from '../../service/statistics/AnalyticsEvents';
import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
-import Statistics from '../statistics/statistics';
import RandomUtil from '../util/RandomUtil';
import ConnectionPlugin from './ConnectionPlugin';
@@ -255,40 +249,9 @@ export default class JingleConnectionPlugin extends ConnectionPlugin {
this.eventEmitter.emit(XMPPEvents.CALL_ENDED, sess, reasonCondition, reasonText);
break;
}
- case 'transport-replace': {
- logger.info('(TIME) Start transport replace:\t', now);
- const transport = $(iq).find('jingle>content>transport');
- const candidates = _parseIceCandidates(transport);
- const iceUfrag = $(transport).attr('ufrag');
- const icePwd = $(transport).attr('pwd');
- const dtlsFingerprint = $(transport).find('>fingerprint')?.text();
-
- logger.debug(`Received ${action} from ${fromJid} with iceUfrag=${iceUfrag},`
- + ` icePwd=${icePwd}, DTLS fingerprint=${dtlsFingerprint}, candidates=${candidates.join(', ')}`);
-
- Statistics.sendAnalytics(createJingleEvent(
- ACTION_JINGLE_TR_RECEIVED,
- {
- p2p: isP2P,
- value: now
- }));
-
- sess.replaceTransport($(iq).find('>jingle'), () => {
- const successTime = window.performance.now();
-
- logger.info('(TIME) Transport replace success:\t', successTime);
- Statistics.sendAnalytics(createJingleEvent(
- ACTION_JINGLE_TR_SUCCESS,
- {
- p2p: isP2P,
- value: successTime
- }));
- }, error => {
- logger.error('Transport replace failed', error);
- sess.sendTransportReject();
- });
+ case 'transport-replace':
+ logger.error(`Ignoring ${action} from ${fromJid} as it is not supported by the client.`);
break;
- }
case 'source-add':
sess.addRemoteStream($(iq).find('>jingle>content'));
break;
diff --git a/service/statistics/AnalyticsEvents.spec.ts b/service/statistics/AnalyticsEvents.spec.ts
index feed7b6981..9fa57b7c86 100644
--- a/service/statistics/AnalyticsEvents.spec.ts
+++ b/service/statistics/AnalyticsEvents.spec.ts
@@ -13,8 +13,6 @@ describe( "/service/statistics/AnalyticsEvents members", () => {
ACTION_JINGLE_SI_RECEIVED,
ACTION_JINGLE_SI_TIMEOUT,
ACTION_JINGLE_TERMINATE,
- ACTION_JINGLE_TR_RECEIVED,
- ACTION_JINGLE_TR_SUCCESS,
ACTION_P2P_DECLINED,
ACTION_P2P_ESTABLISHED,
ACTION_P2P_FAILED,
@@ -61,8 +59,6 @@ describe( "/service/statistics/AnalyticsEvents members", () => {
expect( ACTION_JINGLE_SI_RECEIVED ).toBe( 'session-initiate.received' );
expect( ACTION_JINGLE_SI_TIMEOUT ).toBe( 'session-initiate.timeout' );
expect( ACTION_JINGLE_TERMINATE ).toBe( 'terminate' );
- expect( ACTION_JINGLE_TR_RECEIVED ).toBe( 'transport-replace.received' );
- expect( ACTION_JINGLE_TR_SUCCESS ).toBe( 'transport-replace.success' );
expect( ACTION_P2P_DECLINED ).toBe( 'decline' );
expect( ACTION_P2P_ESTABLISHED ).toBe( 'established' );
expect( ACTION_P2P_FAILED ).toBe( 'failed' );
@@ -88,8 +84,6 @@ describe( "/service/statistics/AnalyticsEvents members", () => {
expect( AnalyticsEvents.ACTION_JINGLE_SI_RECEIVED ).toBe( 'session-initiate.received' );
expect( AnalyticsEvents.ACTION_JINGLE_SI_TIMEOUT ).toBe( 'session-initiate.timeout' );
expect( AnalyticsEvents.ACTION_JINGLE_TERMINATE ).toBe( 'terminate' );
- expect( AnalyticsEvents.ACTION_JINGLE_TR_RECEIVED ).toBe( 'transport-replace.received' );
- expect( AnalyticsEvents.ACTION_JINGLE_TR_SUCCESS ).toBe( 'transport-replace.success' );
expect( AnalyticsEvents.ACTION_P2P_DECLINED ).toBe( 'decline' );
expect( AnalyticsEvents.ACTION_P2P_ESTABLISHED ).toBe( 'established' );
expect( AnalyticsEvents.ACTION_P2P_FAILED ).toBe( 'failed' );
diff --git a/service/statistics/AnalyticsEvents.ts b/service/statistics/AnalyticsEvents.ts
index a0212b31ae..280caea636 100644
--- a/service/statistics/AnalyticsEvents.ts
+++ b/service/statistics/AnalyticsEvents.ts
@@ -74,18 +74,6 @@ export enum AnalyticsEvents {
*/
ACTION_JINGLE_TERMINATE = 'terminate',
- /**
- * The "action" value for Jingle events which indicates that a transport-replace
- * was received.
- */
- ACTION_JINGLE_TR_RECEIVED = 'transport-replace.received',
-
- /**
- * The "action" value for Jingle events which indicates that a transport-replace
- * succeeded (TODO: verify/fix the documentation)
- */
- ACTION_JINGLE_TR_SUCCESS = 'transport-replace.success',
-
/**
* The "action" value for P2P events which indicates that P2P session initiate message has been rejected by the client
* because the mandatory requirements were not met.
@@ -233,8 +221,6 @@ export const ACTION_JINGLE_SA_TIMEOUT = AnalyticsEvents.ACTION_JINGLE_SA_TIMEOUT
export const ACTION_JINGLE_SI_RECEIVED = AnalyticsEvents.ACTION_JINGLE_SI_RECEIVED;
export const ACTION_JINGLE_SI_TIMEOUT = AnalyticsEvents.ACTION_JINGLE_SI_TIMEOUT;
export const ACTION_JINGLE_TERMINATE = AnalyticsEvents.ACTION_JINGLE_TERMINATE;
-export const ACTION_JINGLE_TR_RECEIVED = AnalyticsEvents.ACTION_JINGLE_TR_RECEIVED;
-export const ACTION_JINGLE_TR_SUCCESS = AnalyticsEvents.ACTION_JINGLE_TR_SUCCESS;
export const ACTION_P2P_DECLINED = AnalyticsEvents.ACTION_P2P_DECLINED;
export const ACTION_P2P_ESTABLISHED = AnalyticsEvents.ACTION_P2P_ESTABLISHED;
export const ACTION_P2P_FAILED = AnalyticsEvents.ACTION_P2P_FAILED;
diff --git a/service/xmpp/XMPPEvents.spec.ts b/service/xmpp/XMPPEvents.spec.ts
index 3e5d93df9d..5c074481f5 100644
--- a/service/xmpp/XMPPEvents.spec.ts
+++ b/service/xmpp/XMPPEvents.spec.ts
@@ -36,8 +36,6 @@ describe( "/service/xmpp/XMPPEvents members", () => {
expect( XMPPEvents.FOCUS_DISCONNECTED ).toBe( 'xmpp.focus_disconnected' );
expect( XMPPEvents.FOCUS_LEFT ).toBe( 'xmpp.focus_left' );
expect( XMPPEvents.GRACEFUL_SHUTDOWN ).toBe( 'xmpp.graceful_shutdown' );
- expect( XMPPEvents.ICE_RESTARTING ).toBe( 'rtc.ice_restarting' );
- expect( XMPPEvents.ICE_RESTART_SUCCESS ).toBe( 'rtc.ice_restart_success' );
expect( XMPPEvents.KICKED ).toBe( 'xmpp.kicked' );
expect( XMPPEvents.LOCAL_ROLE_CHANGED ).toBe( 'xmpp.localrole_changed' );
expect( XMPPEvents.MEETING_ID_SET ).toBe( 'xmpp.meeting_id_set' );
diff --git a/service/xmpp/XMPPEvents.ts b/service/xmpp/XMPPEvents.ts
index 1c61c54950..5d596e90ff 100644
--- a/service/xmpp/XMPPEvents.ts
+++ b/service/xmpp/XMPPEvents.ts
@@ -87,18 +87,6 @@ export enum XMPPEvents {
FOCUS_LEFT = 'xmpp.focus_left',
GRACEFUL_SHUTDOWN = 'xmpp.graceful_shutdown',
- /**
- * Event fired when 'transport-replace' Jingle message has been received,
- * before the new offer is set on the PeerConnection.
- */
- ICE_RESTARTING = 'rtc.ice_restarting',
-
- /**
- * Event fired after the 'transport-replace' message has been processed
- * and the new offer has been set successfully.
- */
- ICE_RESTART_SUCCESS = 'rtc.ice_restart_success',
-
/**
* Designates an event indicating that we were kicked from the XMPP MUC.
* @param {boolean} isSelfPresence - whether it is for local participant
diff --git a/types/hand-crafted/JitsiConference.d.ts b/types/hand-crafted/JitsiConference.d.ts
index 0fe7cc1ed2..ed0855e86f 100644
--- a/types/hand-crafted/JitsiConference.d.ts
+++ b/types/hand-crafted/JitsiConference.d.ts
@@ -14,7 +14,6 @@ export default class JitsiConference {
name: string;
config: {
avgRtpStatsN?: number,
- enableIceRestart?: boolean,
p2p?: {
enabled: boolean,
backToP2PDelay?: number
diff --git a/types/hand-crafted/modules/xmpp/ChatRoom.d.ts b/types/hand-crafted/modules/xmpp/ChatRoom.d.ts
index 642cdd7f9a..ad9e5f4cdd 100644
--- a/types/hand-crafted/modules/xmpp/ChatRoom.d.ts
+++ b/types/hand-crafted/modules/xmpp/ChatRoom.d.ts
@@ -21,7 +21,6 @@ export default class ChatRoom extends Listenable {
onConnStatusChanged: ( status: Strophe.Status ) => void;
onPresence: ( pres: unknown ) => void; // TODO:
setParticipantPropertyListener: ( listener: unknown ) => void; // TODO:
- supportsRestartByTerminate: () => boolean;
processNode: ( node: unknown, from: unknown ) => void; // TODO:
sendMessage: ( message: unknown, elementName: string ) => void; // TODO:
sendPrivateMessage: ( id: unknown, message: unknown, elementName: string ) => void; // TODO:
diff --git a/types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts b/types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts
index b11ede157a..ea91d7fdea 100644
--- a/types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts
+++ b/types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts
@@ -11,7 +11,6 @@ export default class JingleSessionPC extends JingleSession {
getRemoteRecvMaxFrameHeight: () => number | undefined;
sendIceCandidate: ( candidate: RTCIceCandidate ) => void;
sendIceCandidates: ( candidates: RTCIceCandidate[] ) => void;
- sendIceFailedNotification: () => void;
addIceCandidates: ( elem: unknown ) => void; // TODO:
readSsrcInfo: ( contents: unknown ) => void; // TODO:
getConfiguredVideoCodec: () => CodecMimeType;
@@ -21,12 +20,9 @@ export default class JingleSessionPC extends JingleSession {
setAnswer: ( jingleAnswer: unknown ) => void; // TODO:
setOfferAnswerCycle: ( jingleOfferAnswerIq: JQuery, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
setVideoCodecs: ( preferred?: CodecMimeType, disabled?: CodecMimeType ) => void;
- replaceTransport: ( jingleOfferElem: unknown, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
sendSessionAccept: ( success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
sendContentModify: () => void;
setReceiverVideoConstraint: ( maxFrameHeight: number ) => void;
- sendTransportAccept: ( localSDP: unknown, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
- sendTransportReject: ( success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
setSenderMaxBitrates: () => Promise;
setSenderVideoConstraint: ( maxFrameHeight: number ) => Promise; // TODO:
setSenderVideoDegradationPreference: () => Promise;
diff --git a/types/hand-crafted/service/statistics/AnalyticsEvents.d.ts b/types/hand-crafted/service/statistics/AnalyticsEvents.d.ts
index f0f0989cd1..e3984bbe10 100644
--- a/types/hand-crafted/service/statistics/AnalyticsEvents.d.ts
+++ b/types/hand-crafted/service/statistics/AnalyticsEvents.d.ts
@@ -10,8 +10,6 @@ export enum AnalyticsEvents {
ACTION_JINGLE_SI_RECEIVED = 'session-initiate.received',
ACTION_JINGLE_SI_TIMEOUT = 'session-initiate.timeout',
ACTION_JINGLE_TERMINATE = 'terminate',
- ACTION_JINGLE_TR_RECEIVED = 'transport-replace.received',
- ACTION_JINGLE_TR_SUCCESS = 'transport-replace.success',
ACTION_P2P_DECLINED = 'decline',
ACTION_P2P_ESTABLISHED = 'established',
ACTION_P2P_FAILED = 'failed',
diff --git a/types/hand-crafted/service/xmpp/XMPPEvents.d.ts b/types/hand-crafted/service/xmpp/XMPPEvents.d.ts
index af705995af..b965e0de54 100644
--- a/types/hand-crafted/service/xmpp/XMPPEvents.d.ts
+++ b/types/hand-crafted/service/xmpp/XMPPEvents.d.ts
@@ -23,8 +23,6 @@
FOCUS_DISCONNECTED = 'xmpp.focus_disconnected',
FOCUS_LEFT = 'xmpp.focus_left',
GRACEFUL_SHUTDOWN = 'xmpp.graceful_shutdown',
- ICE_RESTARTING = 'rtc.ice_restarting',
- ICE_RESTART_SUCCESS = 'rtc.ice_restart_success',
KICKED = 'xmpp.kicked',
LOCAL_ROLE_CHANGED = 'xmpp.localrole_changed',
MEETING_ID_SET = 'xmpp.meeting_id_set',