|
|
@@ -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) {
|