From 0936a64d3f467b3e95039e2e767f6b34b09d8bf8 Mon Sep 17 00:00:00 2001 From: Pawel Domas <2965063+paweldomas@users.noreply.github.com> Date: Tue, 1 Mar 2022 21:04:44 -0600 Subject: [PATCH] fix(receiver constraints): source name not found ...when new participant joins. Repro steps: 1. With p2p disabled and source name signaling enabled. 2. Start a call with 2 tabs. 3. Reload the 2nd tab. 4. The receiver constraints should be updated when the 2nd user rejoins. They were not updated, because getTrackSourceNameByMediaTypeAndParticipant doesn't have the track yet at the time when visibleRemoteParticipants are updated. This is fixed by also checking on the remote tracks state. --- react/features/video-quality/subscriber.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/react/features/video-quality/subscriber.js b/react/features/video-quality/subscriber.js index 13d762d9d..6da83fdba 100644 --- a/react/features/video-quality/subscriber.js +++ b/react/features/video-quality/subscriber.js @@ -30,6 +30,12 @@ StateListenerRegistry.register( _updateReceiverVideoConstraints(store); }, 100)); +StateListenerRegistry.register( + /* selector */ state => state['features/base/tracks'], + /* listener */(remoteTracks, store) => { + _updateReceiverVideoConstraints(store); + }); + /** * Handles the use case when the on-stage participant has changed. */