Browse Source

fix(Conference) Do not kick endpoint out on renegotiation errors.

master
Jaya Allamsetty 5 months ago
parent
commit
a24a4a234f

+ 32
- 9
JitsiConference.js View File

2108
     if (this.p2pJingleSession === session) {
2108
     if (this.p2pJingleSession === session) {
2109
         logger.info('P2P setAnswer');
2109
         logger.info('P2P setAnswer');
2110
 
2110
 
2111
-        this.p2pJingleSession.setAnswer(answer);
2112
-        this.eventEmitter.emit(JitsiConferenceEvents._MEDIA_SESSION_STARTED, this.p2pJingleSession);
2111
+        this.p2pJingleSession.setAnswer(answer)
2112
+            .then(() => {
2113
+                this.eventEmitter.emit(JitsiConferenceEvents._MEDIA_SESSION_STARTED, this.p2pJingleSession);
2114
+            })
2115
+            .catch(error => {
2116
+                logger.error('Error setting P2P answer', error);
2117
+                if (this.p2pJingleSession) {
2118
+                    this.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
2119
+                        JitsiConferenceErrors.OFFER_ANSWER_FAILED, error);
2120
+                }
2121
+            });
2113
     }
2122
     }
2114
 };
2123
 };
2115
 
2124
 
2296
                 });
2305
                 });
2297
             },
2306
             },
2298
             error => {
2307
             error => {
2299
-                logger.error('Failed to accept incoming Jingle session', error);
2308
+                logger.error('Failed to accept incoming JVB Jingle session', error);
2309
+                this.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
2310
+                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, error);
2300
             },
2311
             },
2301
             localTracks
2312
             localTracks
2302
         );
2313
         );
3062
             });
3073
             });
3063
         },
3074
         },
3064
         error => {
3075
         error => {
3065
-            logger.error(
3066
-                'Failed to accept incoming P2P Jingle session', error);
3076
+            logger.error('Failed to accept incoming P2P Jingle session', error);
3077
+            if (this.p2pJingleSession) {
3078
+                this.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
3079
+                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, error);
3080
+            }
3067
         },
3081
         },
3068
         localTracks);
3082
         localTracks);
3069
 };
3083
 };
3408
 
3422
 
3409
     const localTracks = this.getLocalTracks();
3423
     const localTracks = this.getLocalTracks();
3410
 
3424
 
3411
-    this.p2pJingleSession.invite(localTracks);
3425
+    this.p2pJingleSession.invite(localTracks)
3426
+        .then(() => {
3427
+            this.p2pJingleSession.addEventListener(MediaSessionEvents.VIDEO_CODEC_CHANGED, () => {
3428
+                this.eventEmitter.emit(JitsiConferenceEvents.VIDEO_CODEC_CHANGED);
3429
+            });
3430
+        })
3431
+        .catch(error => {
3432
+            logger.error('Failed to start P2P Jingle session', error);
3412
 
3433
 
3413
-    this.p2pJingleSession.addEventListener(MediaSessionEvents.VIDEO_CODEC_CHANGED, () => {
3414
-        this.eventEmitter.emit(JitsiConferenceEvents.VIDEO_CODEC_CHANGED);
3415
-    });
3434
+            if (this.p2pJingleSession) {
3435
+                this.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
3436
+                JitsiConferenceErrors.OFFER_ANSWER_FAILED, error);
3437
+            }
3438
+        });
3416
 };
3439
 };
3417
 
3440
 
3418
 /**
3441
 /**

+ 0
- 39
JitsiConferenceEventManager.js View File

144
             });
144
             });
145
         });
145
         });
146
 
146
 
147
-    chatRoom.addListener(XMPPEvents.RENEGOTIATION_FAILED, (e, session) => {
148
-        if (!session.isP2P) {
149
-            conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
150
-                JitsiConferenceErrors.OFFER_ANSWER_FAILED, e);
151
-        }
152
-    });
153
-
154
     chatRoom.addListener(JitsiTrackEvents.TRACK_OWNER_SET, (track, owner, sourceName, videoType) => {
147
     chatRoom.addListener(JitsiTrackEvents.TRACK_OWNER_SET, (track, owner, sourceName, videoType) => {
155
         if (track.getParticipantId() !== owner || track.getSourceName() !== sourceName) {
148
         if (track.getParticipantId() !== owner || track.getSourceName() !== sourceName) {
156
             conference.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);
149
             conference.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);
523
                 logger.warn(`Ignoring ENDPOINT_STATS_RECEIVED for a non-existant participant: ${from}`);
516
                 logger.warn(`Ignoring ENDPOINT_STATS_RECEIVED for a non-existant participant: ${from}`);
524
             }
517
             }
525
         });
518
         });
526
-
527
-    rtc.addListener(RTCEvents.CREATE_ANSWER_FAILED,
528
-        (e, tpc) => {
529
-            if (!tpc.isP2P) {
530
-                conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
531
-                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, e);
532
-            }
533
-        });
534
-
535
-    rtc.addListener(RTCEvents.CREATE_OFFER_FAILED,
536
-        (e, tpc) => {
537
-            if (!tpc.isP2P) {
538
-                conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
539
-                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, e);
540
-            }
541
-        });
542
-
543
-    rtc.addListener(RTCEvents.SET_LOCAL_DESCRIPTION_FAILED,
544
-        (e, tpc) => {
545
-            if (!tpc.isP2P) {
546
-                conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
547
-                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, e);
548
-            }
549
-        });
550
-
551
-    rtc.addListener(RTCEvents.SET_REMOTE_DESCRIPTION_FAILED,
552
-        (e, tpc) => {
553
-            if (!tpc.isP2P) {
554
-                conference.eventEmitter.emit(JitsiConferenceEvents.CONFERENCE_FAILED,
555
-                    JitsiConferenceErrors.OFFER_ANSWER_FAILED, e);
556
-            }
557
-        });
558
 };
519
 };
559
 
520
 
560
 /**
521
 /**

+ 2
- 10
modules/RTC/TraceablePeerConnection.js View File

2008
                 resolve();
2008
                 resolve();
2009
             }, err => {
2009
             }, err => {
2010
                 this.trace('setLocalDescriptionOnFailure', err);
2010
                 this.trace('setLocalDescriptionOnFailure', err);
2011
-                this.eventEmitter.emit(RTCEvents.SET_LOCAL_DESCRIPTION_FAILED, err, this);
2012
                 reject(err);
2011
                 reject(err);
2013
             });
2012
             });
2014
     });
2013
     });
2046
                 this._initializeDtlsTransport();
2045
                 this._initializeDtlsTransport();
2047
 
2046
 
2048
                 resolve();
2047
                 resolve();
2049
-            }, err => {
2048
+            })
2049
+            .catch(err => {
2050
                 this.trace('setRemoteDescriptionOnFailure', err);
2050
                 this.trace('setRemoteDescriptionOnFailure', err);
2051
-                this.eventEmitter.emit(RTCEvents.SET_REMOTE_DESCRIPTION_FAILED, err, this);
2052
                 reject(err);
2051
                 reject(err);
2053
             });
2052
             });
2054
     });
2053
     });
2448
 
2447
 
2449
     const handleFailure = (err, rejectFn) => {
2448
     const handleFailure = (err, rejectFn) => {
2450
         this.trace(`create${logName}OnFailure`, err);
2449
         this.trace(`create${logName}OnFailure`, err);
2451
-        const eventType
2452
-            = isOffer
2453
-                ? RTCEvents.CREATE_OFFER_FAILED
2454
-                : RTCEvents.CREATE_ANSWER_FAILED;
2455
-
2456
-        this.eventEmitter.emit(eventType, err, this);
2457
-
2458
         rejectFn(err);
2450
         rejectFn(err);
2459
     };
2451
     };
2460
 
2452
 

+ 50
- 63
modules/xmpp/JingleSessionPC.js View File

648
      * error {string}
648
      * error {string}
649
      * @private
649
      * @private
650
      */
650
      */
651
-    _renegotiate(optionalRemoteSdp) {
651
+    async _renegotiate(optionalRemoteSdp) {
652
         if (this.peerconnection.signalingState === 'closed') {
652
         if (this.peerconnection.signalingState === 'closed') {
653
-            const error = new Error('Attempted to renegotiate in state closed');
654
-
655
-            this.room.eventEmitter.emit(XMPPEvents.RENEGOTIATION_FAILED, error, this);
656
-
657
-            return Promise.reject(error);
653
+            throw new Error('Attempted to renegotiate in state closed');
658
         }
654
         }
659
 
655
 
660
         const remoteSdp = optionalRemoteSdp || this.peerconnection.remoteDescription.sdp;
656
         const remoteSdp = optionalRemoteSdp || this.peerconnection.remoteDescription.sdp;
661
 
657
 
662
         if (!remoteSdp) {
658
         if (!remoteSdp) {
663
-            const error = new Error(`Can not renegotiate without remote description, current state: ${this.state}`);
664
-
665
-            this.room.eventEmitter.emit(XMPPEvents.RENEGOTIATION_FAILED, error, this);
666
-
667
-            return Promise.reject(error);
659
+            throw new Error(`Cannot renegotiate without remote description, state=${this.state}`);
668
         }
660
         }
669
 
661
 
670
         const remoteDescription = {
662
         const remoteDescription = {
676
 
668
 
677
         logger.debug(`${this} Renegotiate: setting remote description`);
669
         logger.debug(`${this} Renegotiate: setting remote description`);
678
 
670
 
679
-        return this.peerconnection.setRemoteDescription(remoteDescription)
680
-            .then(() => {
681
-                logger.debug(`${this} Renegotiate: creating answer`);
682
-
683
-                return this.peerconnection.createAnswer(this.mediaConstraints);
684
-            })
685
-            .then(answer => {
686
-                logger.debug(`${this} Renegotiate: setting local description`);
671
+        try {
672
+            await this.peerconnection.setRemoteDescription(remoteDescription);
673
+            logger.debug(`${this} Renegotiate: creating answer`);
674
+            const answer = await this.peerconnection.createAnswer(this.mediaConstraints);
687
 
675
 
688
-                return this.peerconnection.setLocalDescription(answer);
689
-            })
690
-            .then(() => {
691
-                if (oldLocalSDP) {
692
-                    // Send the source updates after every renegotiation cycle.
693
-                    this.notifyMySSRCUpdate(new SDP(oldLocalSDP), new SDP(this.peerconnection.localDescription.sdp));
694
-                }
695
-            });
676
+            logger.debug(`${this} Renegotiate: setting local description`);
677
+            await this.peerconnection.setLocalDescription(answer);
678
+            if (oldLocalSDP) {
679
+                // Send the source updates after every renegotiation cycle.
680
+                this.notifyMySSRCUpdate(new SDP(oldLocalSDP), new SDP(this.peerconnection.localDescription.sdp));
681
+            }
682
+        } catch (error) {
683
+            logger.error(`${this} Renegotiate failed:`, error);
684
+            throw error;
685
+        }
696
     }
686
     }
697
 
687
 
698
     /**
688
     /**
1543
      *
1533
      *
1544
      * @param {Array<JitsiLocalTrack>} localTracks the local tracks that will be added, before the offer/answer cycle
1534
      * @param {Array<JitsiLocalTrack>} localTracks the local tracks that will be added, before the offer/answer cycle
1545
      * executes (for the local track addition to be an atomic operation together with the offer/answer).
1535
      * executes (for the local track addition to be an atomic operation together with the offer/answer).
1546
-     * @returns {void}
1536
+     * @returns {Promise<void>} that resolves when the offer is sent to the remote peer, rejected otherwise.
1547
      */
1537
      */
1548
-    invite(localTracks = []) {
1538
+    async invite(localTracks = []) {
1549
         if (!this.isInitiator) {
1539
         if (!this.isInitiator) {
1550
             throw new Error('Trying to invite from the responder session');
1540
             throw new Error('Trying to invite from the responder session');
1551
         }
1541
         }
1557
             addTracks.push(this.peerconnection.addTrack(track, this.isInitiator));
1547
             addTracks.push(this.peerconnection.addTrack(track, this.isInitiator));
1558
         }
1548
         }
1559
 
1549
 
1560
-        Promise.all(addTracks)
1561
-            .then(() => this.peerconnection.createOffer(this.mediaConstraints))
1562
-            .then(offerSdp => this.peerconnection.setLocalDescription(offerSdp))
1563
-            .then(() => {
1564
-                this.peerconnection.processLocalSdpForTransceiverInfo(localTracks);
1565
-                this._sendSessionInitiate(this.peerconnection.localDescription.sdp);
1566
-            })
1567
-            .then(() => {
1568
-                logger.debug(`${this} invite executed - OK`);
1569
-            })
1570
-            .catch(error => {
1571
-                logger.error(`${this} invite error`, error);
1572
-            });
1550
+        try {
1551
+            await Promise.all(addTracks);
1552
+            const offerSdp = await this.peerconnection.createOffer(this.mediaConstraints);
1553
+
1554
+            await this.peerconnection.setLocalDescription(offerSdp);
1555
+            this.peerconnection.processLocalSdpForTransceiverInfo(localTracks);
1556
+            this._sendSessionInitiate(this.peerconnection.localDescription.sdp);
1557
+
1558
+            logger.debug(`${this} invite executed - OK`);
1559
+        } catch (error) {
1560
+            logger.error(`${this} invite error`, error);
1561
+            throw error;
1562
+        }
1573
     }
1563
     }
1574
 
1564
 
1575
     /**
1565
     /**
2070
      * Sets the answer received from the remote peer as the remote description.
2060
      * Sets the answer received from the remote peer as the remote description.
2071
      *
2061
      *
2072
      * @param {Element} jingleAnswer - The jingle answer element.
2062
      * @param {Element} jingleAnswer - The jingle answer element.
2073
-     * @returns {void}
2074
-     * @throws {Error} if the method is called on a responder session.
2063
+     * @returns {Promise<void>} that resolves when the answer is set as the remote description, rejected otherwise.
2075
      */
2064
      */
2076
-    setAnswer(jingleAnswer) {
2065
+    async setAnswer(jingleAnswer) {
2077
         if (!this.isInitiator) {
2066
         if (!this.isInitiator) {
2078
             throw new Error('Trying to set an answer on the responder session');
2067
             throw new Error('Trying to set an answer on the responder session');
2079
         }
2068
         }
2086
             sdp: newRemoteSdp.raw
2075
             sdp: newRemoteSdp.raw
2087
         };
2076
         };
2088
 
2077
 
2089
-        this.peerconnection.setRemoteDescription(remoteDescription)
2090
-            .then(() => {
2091
-                if (this.state === JingleSessionState.PENDING) {
2092
-                    this.state = JingleSessionState.ACTIVE;
2078
+        try {
2079
+            await this.peerconnection.setRemoteDescription(remoteDescription);
2080
+            if (this.state === JingleSessionState.PENDING) {
2081
+                this.state = JingleSessionState.ACTIVE;
2093
 
2082
 
2094
-                    // Start processing tasks on the modification queue.
2095
-                    logger.debug(`${this} Resuming the modification queue after session is established!`);
2096
-                    this.modificationQueue.resume();
2097
-                    const newLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
2083
+                // Start processing tasks on the modification queue.
2084
+                logger.debug(`${this} Resuming the modification queue after session is established!`);
2085
+                this.modificationQueue.resume();
2086
+                const newLocalSdp = new SDP(this.peerconnection.localDescription.sdp);
2098
 
2087
 
2099
-                    this._sendContentModify();
2100
-                    this.notifyMySSRCUpdate(oldLocalSdp, newLocalSdp);
2101
-                }
2102
-            })
2103
-            .then(() => {
2104
-                logger.debug(`${this} setAnswer task done`);
2105
-            })
2106
-            .catch(error => {
2107
-                logger.error(`${this} setAnswer task failed: ${error}`);
2108
-            });
2088
+                this._sendContentModify();
2089
+                this.notifyMySSRCUpdate(oldLocalSdp, newLocalSdp);
2090
+            }
2091
+            logger.debug(`${this} setAnswer task done`);
2092
+        } catch (error) {
2093
+            logger.error(`${this} setAnswer task failed: ${error}`);
2094
+            throw error;
2095
+        }
2109
     }
2096
     }
2110
 
2097
 
2111
     /**
2098
     /**

+ 0
- 16
service/RTC/RTCEvents.spec.ts View File

5
 describe( "/service/RTC/RTCEvents members", () => {
5
 describe( "/service/RTC/RTCEvents members", () => {
6
     const {
6
     const {
7
         BRIDGE_BWE_STATS_RECEIVED,
7
         BRIDGE_BWE_STATS_RECEIVED,
8
-        CREATE_ANSWER_FAILED,
9
-        CREATE_OFFER_FAILED,
10
         DATA_CHANNEL_OPEN,
8
         DATA_CHANNEL_OPEN,
11
         DATA_CHANNEL_CLOSED,
9
         DATA_CHANNEL_CLOSED,
12
         ENDPOINT_CONN_STATUS_CHANGED,
10
         ENDPOINT_CONN_STATUS_CHANGED,
20
         REMOTE_TRACK_MUTE,
18
         REMOTE_TRACK_MUTE,
21
         REMOTE_TRACK_REMOVED,
19
         REMOTE_TRACK_REMOVED,
22
         REMOTE_TRACK_UNMUTE,
20
         REMOTE_TRACK_UNMUTE,
23
-        SET_LOCAL_DESCRIPTION_FAILED,
24
-        SET_REMOTE_DESCRIPTION_FAILED,
25
         AUDIO_OUTPUT_DEVICE_CHANGED,
21
         AUDIO_OUTPUT_DEVICE_CHANGED,
26
         DEVICE_LIST_CHANGED,
22
         DEVICE_LIST_CHANGED,
27
         DEVICE_LIST_WILL_CHANGE,
23
         DEVICE_LIST_WILL_CHANGE,
39
 
35
 
40
     it( "known members", () => {
36
     it( "known members", () => {
41
         expect( BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
37
         expect( BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
42
-        expect( CREATE_ANSWER_FAILED ).toBe( 'rtc.create_answer_failed' );
43
-        expect( CREATE_OFFER_FAILED ).toBe( 'rtc.create_offer_failed' );
44
         expect( DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
38
         expect( DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
45
         expect( DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
39
         expect( DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
46
         expect( ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
40
         expect( ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
54
         expect( REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
48
         expect( REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
55
         expect( REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
49
         expect( REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
56
         expect( REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
50
         expect( REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
57
-        expect( SET_LOCAL_DESCRIPTION_FAILED ).toBe( 'rtc.set_local_description_failed' );
58
-        expect( SET_REMOTE_DESCRIPTION_FAILED ).toBe( 'rtc.set_remote_description_failed' );
59
         expect( AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
51
         expect( AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
60
         expect( DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
52
         expect( DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
61
         expect( DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
53
         expect( DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
69
 
61
 
70
         if ( RTCEvents ) {
62
         if ( RTCEvents ) {
71
             expect( RTCEvents.BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
63
             expect( RTCEvents.BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
72
-            expect( RTCEvents.CREATE_ANSWER_FAILED ).toBe( 'rtc.create_answer_failed' );
73
-            expect( RTCEvents.CREATE_OFFER_FAILED ).toBe( 'rtc.create_offer_failed' );
74
             expect( RTCEvents.DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
64
             expect( RTCEvents.DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
75
             expect( RTCEvents.DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
65
             expect( RTCEvents.DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
76
             expect( RTCEvents.ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
66
             expect( RTCEvents.ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
83
             expect( RTCEvents.REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
73
             expect( RTCEvents.REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
84
             expect( RTCEvents.REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
74
             expect( RTCEvents.REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
85
             expect( RTCEvents.REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
75
             expect( RTCEvents.REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
86
-            expect( RTCEvents.SET_LOCAL_DESCRIPTION_FAILED ).toBe( 'rtc.set_local_description_failed' );
87
-            expect( RTCEvents.SET_REMOTE_DESCRIPTION_FAILED ).toBe( 'rtc.set_remote_description_failed' );
88
             expect( RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
76
             expect( RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
89
             expect( RTCEvents.DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
77
             expect( RTCEvents.DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
90
             expect( RTCEvents.DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
78
             expect( RTCEvents.DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
99
 
87
 
100
         if ( RTCEventsDefault ) {
88
         if ( RTCEventsDefault ) {
101
             expect( RTCEventsDefault.BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
89
             expect( RTCEventsDefault.BRIDGE_BWE_STATS_RECEIVED ).toBe( 'rtc.bridge_bwe_stats_received' );
102
-            expect( RTCEventsDefault.CREATE_ANSWER_FAILED ).toBe( 'rtc.create_answer_failed' );
103
-            expect( RTCEventsDefault.CREATE_OFFER_FAILED ).toBe( 'rtc.create_offer_failed' );
104
             expect( RTCEventsDefault.DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
90
             expect( RTCEventsDefault.DATA_CHANNEL_OPEN ).toBe( 'rtc.data_channel_open' );
105
             expect( RTCEventsDefault.DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
91
             expect( RTCEventsDefault.DATA_CHANNEL_CLOSED ).toBe( 'rtc.data_channel_closed' );
106
             expect( RTCEventsDefault.ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
92
             expect( RTCEventsDefault.ENDPOINT_CONN_STATUS_CHANGED ).toBe( 'rtc.endpoint_conn_status_changed' );
113
             expect( RTCEventsDefault.REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
99
             expect( RTCEventsDefault.REMOTE_TRACK_MUTE ).toBe( 'rtc.remote_track_mute' );
114
             expect( RTCEventsDefault.REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
100
             expect( RTCEventsDefault.REMOTE_TRACK_REMOVED ).toBe( 'rtc.remote_track_removed' );
115
             expect( RTCEventsDefault.REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
101
             expect( RTCEventsDefault.REMOTE_TRACK_UNMUTE ).toBe( 'rtc.remote_track_unmute' );
116
-            expect( RTCEventsDefault.SET_LOCAL_DESCRIPTION_FAILED ).toBe( 'rtc.set_local_description_failed' );
117
-            expect( RTCEventsDefault.SET_REMOTE_DESCRIPTION_FAILED ).toBe( 'rtc.set_remote_description_failed' );
118
             expect( RTCEventsDefault.AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
102
             expect( RTCEventsDefault.AUDIO_OUTPUT_DEVICE_CHANGED ).toBe( 'rtc.audio_output_device_changed' );
119
             expect( RTCEventsDefault.DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
103
             expect( RTCEventsDefault.DEVICE_LIST_CHANGED ).toBe( 'rtc.device_list_changed' );
120
             expect( RTCEventsDefault.DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );
104
             expect( RTCEventsDefault.DEVICE_LIST_WILL_CHANGE ).toBe( 'rtc.device_list_will_change' );

+ 0
- 24
service/RTC/RTCEvents.ts View File

15
      */
15
      */
16
     BRIDGE_BWE_STATS_RECEIVED = 'rtc.bridge_bwe_stats_received',
16
     BRIDGE_BWE_STATS_RECEIVED = 'rtc.bridge_bwe_stats_received',
17
 
17
 
18
-    /**
19
-     * Indicates error while create answer call.
20
-     */
21
-    CREATE_ANSWER_FAILED = 'rtc.create_answer_failed',
22
-
23
-    /**
24
-     * Indicates error while create offer call.
25
-     */
26
-    CREATE_OFFER_FAILED = 'rtc.create_offer_failed',
27
-
28
     /**
18
     /**
29
      * Indicates that the data channel has been closed.
19
      * Indicates that the data channel has been closed.
30
      */
20
      */
134
      */
124
      */
135
     SENDER_VIDEO_CONSTRAINTS_CHANGED = 'rtc.sender_video_constraints_changed',
125
     SENDER_VIDEO_CONSTRAINTS_CHANGED = 'rtc.sender_video_constraints_changed',
136
 
126
 
137
-    /**
138
-     * Indicates error while set local description.
139
-     */
140
-    SET_LOCAL_DESCRIPTION_FAILED = 'rtc.set_local_description_failed',
141
-
142
-    /**
143
-     * Indicates error while set remote description.
144
-     */
145
-    SET_REMOTE_DESCRIPTION_FAILED = 'rtc.set_remote_description_failed',
146
-
147
     /**
127
     /**
148
      * Designates an event indicating that some video SSRCs that have already been signaled will now map to new remote
128
      * Designates an event indicating that some video SSRCs that have already been signaled will now map to new remote
149
      * sources.
129
      * sources.
152
 }
132
 }
153
 
133
 
154
 export const BRIDGE_BWE_STATS_RECEIVED = RTCEvents.BRIDGE_BWE_STATS_RECEIVED;
134
 export const BRIDGE_BWE_STATS_RECEIVED = RTCEvents.BRIDGE_BWE_STATS_RECEIVED;
155
-export const CREATE_ANSWER_FAILED = RTCEvents.CREATE_ANSWER_FAILED;
156
-export const CREATE_OFFER_FAILED = RTCEvents.CREATE_OFFER_FAILED;
157
 export const DATA_CHANNEL_OPEN = RTCEvents.DATA_CHANNEL_OPEN;
135
 export const DATA_CHANNEL_OPEN = RTCEvents.DATA_CHANNEL_OPEN;
158
 export const DATA_CHANNEL_CLOSED = RTCEvents.DATA_CHANNEL_CLOSED;
136
 export const DATA_CHANNEL_CLOSED = RTCEvents.DATA_CHANNEL_CLOSED;
159
 export const ENDPOINT_CONN_STATUS_CHANGED = RTCEvents.ENDPOINT_CONN_STATUS_CHANGED;
137
 export const ENDPOINT_CONN_STATUS_CHANGED = RTCEvents.ENDPOINT_CONN_STATUS_CHANGED;
167
 export const REMOTE_TRACK_MUTE = RTCEvents.REMOTE_TRACK_MUTE;
145
 export const REMOTE_TRACK_MUTE = RTCEvents.REMOTE_TRACK_MUTE;
168
 export const REMOTE_TRACK_REMOVED = RTCEvents.REMOTE_TRACK_REMOVED;
146
 export const REMOTE_TRACK_REMOVED = RTCEvents.REMOTE_TRACK_REMOVED;
169
 export const REMOTE_TRACK_UNMUTE = RTCEvents.REMOTE_TRACK_UNMUTE;
147
 export const REMOTE_TRACK_UNMUTE = RTCEvents.REMOTE_TRACK_UNMUTE;
170
-export const SET_LOCAL_DESCRIPTION_FAILED = RTCEvents.SET_LOCAL_DESCRIPTION_FAILED;
171
-export const SET_REMOTE_DESCRIPTION_FAILED = RTCEvents.SET_REMOTE_DESCRIPTION_FAILED;
172
 export const AUDIO_OUTPUT_DEVICE_CHANGED = RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED;
148
 export const AUDIO_OUTPUT_DEVICE_CHANGED = RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED;
173
 export const DEVICE_LIST_CHANGED = RTCEvents.DEVICE_LIST_CHANGED;
149
 export const DEVICE_LIST_CHANGED = RTCEvents.DEVICE_LIST_CHANGED;
174
 export const DEVICE_LIST_WILL_CHANGE = RTCEvents.DEVICE_LIST_WILL_CHANGE;
150
 export const DEVICE_LIST_WILL_CHANGE = RTCEvents.DEVICE_LIST_WILL_CHANGE;

+ 0
- 2
service/xmpp/XMPPEvents.spec.ts View File

69
         expect( XMPPEvents.READY_TO_JOIN ).toBe( 'xmpp.ready_to_join' );
69
         expect( XMPPEvents.READY_TO_JOIN ).toBe( 'xmpp.ready_to_join' );
70
         expect( XMPPEvents.RECORDER_STATE_CHANGED ).toBe( 'xmpp.recorderStateChanged' );
70
         expect( XMPPEvents.RECORDER_STATE_CHANGED ).toBe( 'xmpp.recorderStateChanged' );
71
         expect( XMPPEvents.REMOTE_STATS ).toBe( 'xmpp.remote_stats' );
71
         expect( XMPPEvents.REMOTE_STATS ).toBe( 'xmpp.remote_stats' );
72
-        expect( XMPPEvents.RENEGOTIATION_FAILED ).toBe( 'xmpp.renegotiation_failed' );
73
-        expect( XMPPEvents.RESERVATION_ERROR ).toBe( 'xmpp.room_reservation_error' );
74
         expect( XMPPEvents.ROOM_CONNECT_ERROR ).toBe( 'xmpp.room_connect_error' );
72
         expect( XMPPEvents.ROOM_CONNECT_ERROR ).toBe( 'xmpp.room_connect_error' );
75
         expect( XMPPEvents.ROOM_CONNECT_NOT_ALLOWED_ERROR ).toBe( 'xmpp.room_connect_error.not_allowed' );
73
         expect( XMPPEvents.ROOM_CONNECT_NOT_ALLOWED_ERROR ).toBe( 'xmpp.room_connect_error.not_allowed' );
76
         expect( XMPPEvents.ROOM_JOIN_ERROR ).toBe( 'xmpp.room_join_error' );
74
         expect( XMPPEvents.ROOM_JOIN_ERROR ).toBe( 'xmpp.room_join_error' );

+ 0
- 5
service/xmpp/XMPPEvents.ts View File

278
     // participant in the MUC.
278
     // participant in the MUC.
279
     REMOTE_STATS = 'xmpp.remote_stats',
279
     REMOTE_STATS = 'xmpp.remote_stats',
280
 
280
 
281
-    /**
282
-     * Indicates that the offer / answer renegotiation has failed.
283
-     */
284
-    RENEGOTIATION_FAILED = 'xmpp.renegotiation_failed',
285
-
286
     RESERVATION_ERROR = 'xmpp.room_reservation_error',
281
     RESERVATION_ERROR = 'xmpp.room_reservation_error',
287
 
282
 
288
     ROOM_CONNECT_ERROR = 'xmpp.room_connect_error',
283
     ROOM_CONNECT_ERROR = 'xmpp.room_connect_error',

+ 0
- 4
types/hand-crafted/service/RTC/RTCEvents.d.ts View File

1
 export enum RTCEvents {
1
 export enum RTCEvents {
2
-  CREATE_ANSWER_FAILED = 'rtc.create_answer_failed',
3
-  CREATE_OFFER_FAILED = 'rtc.create_offer_failed',
4
   DATA_CHANNEL_OPEN = 'rtc.data_channel_open',
2
   DATA_CHANNEL_OPEN = 'rtc.data_channel_open',
5
   ENDPOINT_CONN_STATUS_CHANGED = 'rtc.endpoint_conn_status_changed',
3
   ENDPOINT_CONN_STATUS_CHANGED = 'rtc.endpoint_conn_status_changed',
6
   DOMINANT_SPEAKER_CHANGED = 'rtc.dominant_speaker_changed',
4
   DOMINANT_SPEAKER_CHANGED = 'rtc.dominant_speaker_changed',
13
   REMOTE_TRACK_MUTE = 'rtc.remote_track_mute',
11
   REMOTE_TRACK_MUTE = 'rtc.remote_track_mute',
14
   REMOTE_TRACK_REMOVED = 'rtc.remote_track_removed',
12
   REMOTE_TRACK_REMOVED = 'rtc.remote_track_removed',
15
   REMOTE_TRACK_UNMUTE = 'rtc.remote_track_unmute',
13
   REMOTE_TRACK_UNMUTE = 'rtc.remote_track_unmute',
16
-  SET_LOCAL_DESCRIPTION_FAILED = 'rtc.set_local_description_failed',
17
-  SET_REMOTE_DESCRIPTION_FAILED = 'rtc.set_remote_description_failed',
18
   AUDIO_OUTPUT_DEVICE_CHANGED = 'rtc.audio_output_device_changed',
14
   AUDIO_OUTPUT_DEVICE_CHANGED = 'rtc.audio_output_device_changed',
19
   DEVICE_LIST_CHANGED = 'rtc.device_list_changed',
15
   DEVICE_LIST_CHANGED = 'rtc.device_list_changed',
20
   DEVICE_LIST_WILL_CHANGE = 'rtc.device_list_will_change',
16
   DEVICE_LIST_WILL_CHANGE = 'rtc.device_list_will_change',

+ 0
- 1
types/hand-crafted/service/xmpp/XMPPEvents.d.ts View File

54
   READY_TO_JOIN = 'xmpp.ready_to_join',
54
   READY_TO_JOIN = 'xmpp.ready_to_join',
55
   RECORDER_STATE_CHANGED = 'xmpp.recorderStateChanged',
55
   RECORDER_STATE_CHANGED = 'xmpp.recorderStateChanged',
56
   REMOTE_STATS = 'xmpp.remote_stats',
56
   REMOTE_STATS = 'xmpp.remote_stats',
57
-  RENEGOTIATION_FAILED = 'xmpp.renegotiation_failed',
58
   RESERVATION_ERROR = 'xmpp.room_reservation_error',
57
   RESERVATION_ERROR = 'xmpp.room_reservation_error',
59
   ROOM_CONNECT_ERROR = 'xmpp.room_connect_error',
58
   ROOM_CONNECT_ERROR = 'xmpp.room_connect_error',
60
   ROOM_CONNECT_NOT_ALLOWED_ERROR = 'xmpp.room_connect_error.not_allowed',
59
   ROOM_CONNECT_NOT_ALLOWED_ERROR = 'xmpp.room_connect_error.not_allowed',

Loading…
Cancel
Save