From e839684ae9e77b2b59413cbd8c5b38f8a442d672 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Mon, 25 Mar 2019 18:15:50 -0500 Subject: [PATCH] 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. --- react/features/base/conference/middleware.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index a2d1c74eb..f21cb07e1 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -43,6 +43,7 @@ import { import { _addLocalTracksToConference, forEachConference, + getCurrentConference, _handleParticipantError, _removeLocalTracksFromConference } from './functions'; @@ -620,13 +621,10 @@ function _setRoom({ dispatch, getState }, next, action) { * @returns {Promise} */ function _syncConferenceLocalTracksWithState({ getState }, action) { - const state = getState()['features/base/conference']; - const { conference } = state; + const conference = getCurrentConference(getState); let promise; - // XXX The conference may already be in the process of being left, that's - // why we should not add/remove local tracks to such conference. - if (conference && conference !== state.leaving) { + if (conference) { const track = action.track.jitsiTrack; if (action.type === TRACK_ADDED) {