From bbfe7b4f3206e67d2e4bb65134e27ac7123659d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Thu, 14 Apr 2022 14:35:41 -0500 Subject: [PATCH] fix: Skips clearing tracks on conference failed. In case of conference failed as max number of occupants reached, we should skip clearing the local tracks to keep state of pre-join screen. Otherwise, on join we will join muted even though on prejoin screen it was unmuted on the initial attempt. --- react/features/base/tracks/middleware.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.js index 266cf8d35..ec42a9dfb 100644 --- a/react/features/base/tracks/middleware.js +++ b/react/features/base/tracks/middleware.js @@ -318,9 +318,10 @@ MiddlewareRegistry.register(store => next => action => { StateListenerRegistry.register( state => getCurrentConference(state), (conference, { dispatch, getState }, prevConference) => { + const { authRequired, error } = getState()['features/base/conference']; // conference keep flipping while we are authenticating, skip clearing while we are in that process - if (prevConference && !conference && !getState()['features/base/conference'].authRequired) { + if (prevConference && !conference && !authRequired && !error) { // Clear all tracks. const remoteTracks = getState()['features/base/tracks'].filter(t => !t.local);