|
@@ -76,6 +76,15 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
|
76
|
76
|
// else: there are no DataChannels in P2P session (at least for now)
|
77
|
77
|
});
|
78
|
78
|
|
|
79
|
+ chatRoom.addListener(XMPPEvents.PARTICIPANT_FEATURES_CHANGED, (from, features) => {
|
|
80
|
+ const participant = conference.getParticipantById(Strophe.getResourceFromJid(from));
|
|
81
|
+
|
|
82
|
+ if (participant) {
|
|
83
|
+ participant.setFeatures(features);
|
|
84
|
+ conference.eventEmitter.emit(JitsiConferenceEvents.PARTCIPANT_FEATURES_CHANGED, participant);
|
|
85
|
+ }
|
|
86
|
+ });
|
|
87
|
+
|
79
|
88
|
chatRoom.addListener(
|
80
|
89
|
XMPPEvents.ICE_RESTART_SUCCESS,
|
81
|
90
|
(jingleSession, offerIq) => {
|
|
@@ -607,11 +616,6 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() {
|
607
|
616
|
JitsiConferenceEventManager.prototype.removeXMPPListeners = function() {
|
608
|
617
|
const conference = this.conference;
|
609
|
618
|
|
610
|
|
- conference.xmpp.caps.removeListener(
|
611
|
|
- XMPPEvents.PARTICIPANT_FEATURES_CHANGED,
|
612
|
|
- this.xmppListeners[XMPPEvents.PARTICIPANT_FEATURES_CHANGED]);
|
613
|
|
- delete this.xmppListeners[XMPPEvents.PARTICIPANT_FEATURES_CHANGED];
|
614
|
|
-
|
615
|
619
|
Object.keys(this.xmppListeners).forEach(eventName => {
|
616
|
620
|
conference.xmpp.removeListener(
|
617
|
621
|
eventName,
|
|
@@ -627,18 +631,6 @@ JitsiConferenceEventManager.prototype.removeXMPPListeners = function() {
|
627
|
631
|
JitsiConferenceEventManager.prototype.setupXMPPListeners = function() {
|
628
|
632
|
const conference = this.conference;
|
629
|
633
|
|
630
|
|
- const featuresChangedListener = (from, features) => {
|
631
|
|
- const participant = conference.getParticipantById(Strophe.getResourceFromJid(from));
|
632
|
|
-
|
633
|
|
- if (participant) {
|
634
|
|
- participant.setFeatures(features);
|
635
|
|
- conference.eventEmitter.emit(JitsiConferenceEvents.PARTCIPANT_FEATURES_CHANGED, participant);
|
636
|
|
- }
|
637
|
|
- };
|
638
|
|
-
|
639
|
|
- conference.xmpp.caps.addListener(XMPPEvents.PARTICIPANT_FEATURES_CHANGED, featuresChangedListener);
|
640
|
|
- this.xmppListeners[XMPPEvents.PARTICIPANT_FEATURES_CHANGED] = featuresChangedListener;
|
641
|
|
-
|
642
|
634
|
this._addConferenceXMPPListener(
|
643
|
635
|
XMPPEvents.CALL_INCOMING,
|
644
|
636
|
conference.onIncomingCall.bind(conference));
|