Bladeren bron

fix(base/conference): tracks not added to the conference

If tracks are created while the conference is in the 'joining' state
they will never be added.
master
paweldomas 6 jaren geleden
bovenliggende
commit
e839684ae9
1 gewijzigde bestanden met toevoegingen van 3 en 5 verwijderingen
  1. 3
    5
      react/features/base/conference/middleware.js

+ 3
- 5
react/features/base/conference/middleware.js Bestand weergeven

@@ -43,6 +43,7 @@ import {
43 43
 import {
44 44
     _addLocalTracksToConference,
45 45
     forEachConference,
46
+    getCurrentConference,
46 47
     _handleParticipantError,
47 48
     _removeLocalTracksFromConference
48 49
 } from './functions';
@@ -620,13 +621,10 @@ function _setRoom({ dispatch, getState }, next, action) {
620 621
  * @returns {Promise}
621 622
  */
622 623
 function _syncConferenceLocalTracksWithState({ getState }, action) {
623
-    const state = getState()['features/base/conference'];
624
-    const { conference } = state;
624
+    const conference = getCurrentConference(getState);
625 625
     let promise;
626 626
 
627
-    // XXX The conference may already be in the process of being left, that's
628
-    // why we should not add/remove local tracks to such conference.
629
-    if (conference && conference !== state.leaving) {
627
+    if (conference) {
630 628
         const track = action.track.jitsiTrack;
631 629
 
632 630
         if (action.type === TRACK_ADDED) {

Laden…
Annuleren
Opslaan