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.
This commit is contained in:
Pawel Domas 2022-03-01 21:04:44 -06:00 committed by Jaya Allamsetty
parent c6eccb1a5a
commit 0936a64d3f
1 changed files with 6 additions and 0 deletions

View File

@ -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.
*/