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.
This commit is contained in:
parent
15c5a2339b
commit
e839684ae9
|
@ -43,6 +43,7 @@ import {
|
||||||
import {
|
import {
|
||||||
_addLocalTracksToConference,
|
_addLocalTracksToConference,
|
||||||
forEachConference,
|
forEachConference,
|
||||||
|
getCurrentConference,
|
||||||
_handleParticipantError,
|
_handleParticipantError,
|
||||||
_removeLocalTracksFromConference
|
_removeLocalTracksFromConference
|
||||||
} from './functions';
|
} from './functions';
|
||||||
|
@ -620,13 +621,10 @@ function _setRoom({ dispatch, getState }, next, action) {
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
function _syncConferenceLocalTracksWithState({ getState }, action) {
|
function _syncConferenceLocalTracksWithState({ getState }, action) {
|
||||||
const state = getState()['features/base/conference'];
|
const conference = getCurrentConference(getState);
|
||||||
const { conference } = state;
|
|
||||||
let promise;
|
let promise;
|
||||||
|
|
||||||
// XXX The conference may already be in the process of being left, that's
|
if (conference) {
|
||||||
// why we should not add/remove local tracks to such conference.
|
|
||||||
if (conference && conference !== state.leaving) {
|
|
||||||
const track = action.track.jitsiTrack;
|
const track = action.track.jitsiTrack;
|
||||||
|
|
||||||
if (action.type === TRACK_ADDED) {
|
if (action.type === TRACK_ADDED) {
|
||||||
|
|
Loading…
Reference in New Issue