From b8aa74f212fc6d4797dc384d275b508628c7e720 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Wed, 18 Sep 2019 14:09:52 -0700 Subject: [PATCH] fix(large-video): bring back workaround for selecting on conference join Bring back the workaround introduced in afd2aea7 but removed in 21dcc41d. On conference join, several other actions have already been fired that try to set the large video participant and select the participant on the bridge. The problem is there is no conference during these actions so the select participant never fires. Then subsequent actions do not fire select participant because the large video participant has not changed. --- react/features/large-video/middleware.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react/features/large-video/middleware.js b/react/features/large-video/middleware.js index 7846750b1..fb8ed2e4e 100644 --- a/react/features/large-video/middleware.js +++ b/react/features/large-video/middleware.js @@ -38,7 +38,6 @@ MiddlewareRegistry.register(store => next => action => { break; } - case CONFERENCE_JOINED: case PARTICIPANT_JOINED: case PARTICIPANT_LEFT: case PIN_PARTICIPANT: @@ -47,6 +46,13 @@ MiddlewareRegistry.register(store => next => action => { store.dispatch(selectParticipantInLargeVideo()); break; + case CONFERENCE_JOINED: + // Ensure a participant is selected on conference join. This addresses + // the case where video tracks were received before CONFERENCE_JOINED + // fired; without the conference selection may not happen. + store.dispatch(selectParticipant()); + break; + case TRACK_UPDATED: // In order to minimize re-calculations, we need to select participant // only if the videoType of the current participant rendered in