Selaa lähdekoodia

fix(ICE) remove force reload option on ICE failures.

Restarting media session when ICE fails has been working well for some time now.
master
Jaya Allamsetty 4 kuukautta sitten
vanhempi
commit
6de3a8fff5

+ 0
- 2
JitsiConferenceErrors.spec.ts Näytä tiedosto

42
         expect( CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
42
         expect( CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
43
         expect( CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
43
         expect( CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
44
         expect( CONNECTION_ERROR ).toBe( 'conference.connectionError' );
44
         expect( CONNECTION_ERROR ).toBe( 'conference.connectionError' );
45
-        expect( CONFERENCE_RESTARTED ).toBe( 'conference.restarted' );
46
         expect( DISPLAY_NAME_REQUIRED ).toBe( 'conference.display_name_required' );
45
         expect( DISPLAY_NAME_REQUIRED ).toBe( 'conference.display_name_required' );
47
         expect( NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
46
         expect( NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
48
         expect( MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );
47
         expect( MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );
66
         expect( JitsiConferenceErrors.CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
65
         expect( JitsiConferenceErrors.CONFERENCE_DESTROYED ).toBe( 'conference.destroyed' );
67
         expect( JitsiConferenceErrors.CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
66
         expect( JitsiConferenceErrors.CONFERENCE_MAX_USERS ).toBe( 'conference.max_users' );
68
         expect( JitsiConferenceErrors.CONNECTION_ERROR ).toBe( 'conference.connectionError' );
67
         expect( JitsiConferenceErrors.CONNECTION_ERROR ).toBe( 'conference.connectionError' );
69
-        expect( JitsiConferenceErrors.CONFERENCE_RESTARTED ).toBe( 'conference.restarted' );
70
         expect( JitsiConferenceErrors.DISPLAY_NAME_REQUIRED ).toBe( 'conference.display_name_required' );
68
         expect( JitsiConferenceErrors.DISPLAY_NAME_REQUIRED ).toBe( 'conference.display_name_required' );
71
         expect( JitsiConferenceErrors.NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
69
         expect( JitsiConferenceErrors.NOT_ALLOWED_ERROR ).toBe( 'conference.connectionError.notAllowed' );
72
         expect( JitsiConferenceErrors.MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );
70
         expect( JitsiConferenceErrors.MEMBERS_ONLY_ERROR ).toBe( 'conference.connectionError.membersOnly' );

+ 0
- 7
JitsiConferenceErrors.ts Näytä tiedosto

30
      */
30
      */
31
     CONFERENCE_MAX_USERS = 'conference.max_users',
31
     CONFERENCE_MAX_USERS = 'conference.max_users',
32
 
32
 
33
-    /**
34
-     * Indicates that the client has been forced to restart by jicofo when the
35
-     * conference was migrated from one bridge to another.
36
-     */
37
-    CONFERENCE_RESTARTED = 'conference.restarted',
38
-
39
     /**
33
     /**
40
      * Indicates that a connection error occurred when trying to join a conference.
34
      * Indicates that a connection error occurred when trying to join a conference.
41
      */
35
      */
135
 export const CONFERENCE_DESTROYED = JitsiConferenceErrors.CONFERENCE_DESTROYED;
129
 export const CONFERENCE_DESTROYED = JitsiConferenceErrors.CONFERENCE_DESTROYED;
136
 export const CONFERENCE_MAX_USERS = JitsiConferenceErrors.CONFERENCE_MAX_USERS;
130
 export const CONFERENCE_MAX_USERS = JitsiConferenceErrors.CONFERENCE_MAX_USERS;
137
 export const CONNECTION_ERROR = JitsiConferenceErrors.CONNECTION_ERROR;
131
 export const CONNECTION_ERROR = JitsiConferenceErrors.CONNECTION_ERROR;
138
-export const CONFERENCE_RESTARTED = JitsiConferenceErrors.CONFERENCE_RESTARTED;
139
 export const NOT_ALLOWED_ERROR = JitsiConferenceErrors.NOT_ALLOWED_ERROR;
132
 export const NOT_ALLOWED_ERROR = JitsiConferenceErrors.NOT_ALLOWED_ERROR;
140
 export const MEMBERS_ONLY_ERROR = JitsiConferenceErrors.MEMBERS_ONLY_ERROR;
133
 export const MEMBERS_ONLY_ERROR = JitsiConferenceErrors.MEMBERS_ONLY_ERROR;
141
 export const CONFERENCE_ACCESS_DENIED = JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED;
134
 export const CONFERENCE_ACCESS_DENIED = JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED;

+ 0
- 17
modules/connectivity/IceFailedHandling.spec.js Näytä tiedosto

89
                 });
89
                 });
90
         });
90
         });
91
     });
91
     });
92
-    describe('when forced reloads are enabled', () => {
93
-        beforeEach(() => {
94
-            mockConference.options.config.enableForcedReload = true;
95
-
96
-            mockConference.room = {};
97
-        });
98
-
99
-        it('emits conference restarted when force reloads are enabled', () => {
100
-            iceFailedHandling.start();
101
-
102
-            return nextTick() // tick for ping
103
-                .then(() => nextTick(2500)) // tick for ice timeout
104
-                .then(() => {
105
-                    expect(emitEventSpy).toHaveBeenCalled();
106
-                });
107
-        });
108
-    });
109
 });
92
 });

+ 1
- 17
modules/connectivity/IceFailedHandling.ts Näytä tiedosto

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 
2
 
3
 import JitsiConference from '../../JitsiConference';
3
 import JitsiConference from '../../JitsiConference';
4
-import * as JitsiConferenceErrors from '../../JitsiConferenceErrors';
5
-import * as JitsiConferenceEvents from '../../JitsiConferenceEvents';
6
 
4
 
7
 const logger = getLogger('modules/connectivity/IceFailedHandling');
5
 const logger = getLogger('modules/connectivity/IceFailedHandling');
8
 
6
 
11
  *
9
  *
12
  * If ICE connection is not re-established within 2 secs after the internet comes back online, the client will initiate
10
  * If ICE connection is not re-established within 2 secs after the internet comes back online, the client will initiate
13
  * a session restart via 'session-terminate'. This results in Jicofo re-inviting the participant into the conference by
11
  * a session restart via 'session-terminate'. This results in Jicofo re-inviting the participant into the conference by
14
- * recreating the jvb media session so that there is minimla disruption to the user by default. However, if the
15
- * 'enableForcedReload' option is set in config.js, the conference will be forcefully reloaded.
12
+ * recreating the jvb media session so that there is minimla disruption to the user by default.
16
  */
13
  */
17
 export default class IceFailedHandling {
14
 export default class IceFailedHandling {
18
     private _conference: JitsiConference;
15
     private _conference: JitsiConference;
38
             return;
35
             return;
39
         }
36
         }
40
 
37
 
41
-        const { enableForcedReload } = this._conference.options.config;
42
-
43
-        logger.info(`ICE failed, enableForcedReload: ${enableForcedReload}`);
44
-
45
-        if (enableForcedReload) {
46
-            logger.info('ICE failed, force reloading the conference');
47
-            this._conference.eventEmitter.emit(
48
-                JitsiConferenceEvents.CONFERENCE_FAILED,
49
-                JitsiConferenceErrors.CONFERENCE_RESTARTED);
50
-
51
-            return;
52
-        }
53
-
54
         const jvbConnection = this._conference.jvbJingleSession;
38
         const jvbConnection = this._conference.jvbJingleSession;
55
         const jvbConnIceState = jvbConnection?.getIceConnectionState();
39
         const jvbConnIceState = jvbConnection?.getIceConnectionState();
56
 
40
 

+ 0
- 1
types/hand-crafted/JitsiConferenceErrors.d.ts Näytä tiedosto

4
   CONFERENCE_DESTROYED = 'conference.destroyed',
4
   CONFERENCE_DESTROYED = 'conference.destroyed',
5
   CONFERENCE_MAX_USERS = 'conference.max_users',
5
   CONFERENCE_MAX_USERS = 'conference.max_users',
6
   CONNECTION_ERROR = 'conference.connectionError',
6
   CONNECTION_ERROR = 'conference.connectionError',
7
-  CONFERENCE_RESTARTED = 'conference.restarted',
8
   NOT_ALLOWED_ERROR = 'conference.connectionError.notAllowed',
7
   NOT_ALLOWED_ERROR = 'conference.connectionError.notAllowed',
9
   MEMBERS_ONLY_ERROR = 'conference.connectionError.membersOnly',
8
   MEMBERS_ONLY_ERROR = 'conference.connectionError.membersOnly',
10
   CONFERENCE_ACCESS_DENIED = 'conference.connectionError.accessDenied',
9
   CONFERENCE_ACCESS_DENIED = 'conference.connectionError.accessDenied',

Loading…
Peruuta
Tallenna