2021-08-23 23:02:41 +00:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import { StateListenerRegistry } from '../base/redux';
|
|
|
|
|
|
|
|
import { updateRemoteParticipants } from './functions';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Listens for changes to the screensharing status of the remote participants to recompute the reordered list of the
|
|
|
|
* remote endpoints.
|
|
|
|
*/
|
|
|
|
StateListenerRegistry.register(
|
|
|
|
/* selector */ state => state['features/video-layout'].remoteScreenShares,
|
|
|
|
/* listener */ (remoteScreenShares, store) => updateRemoteParticipants(store));
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Listens for changes to the dominant speaker to recompute the reordered list of the remote endpoints.
|
|
|
|
*/
|
|
|
|
StateListenerRegistry.register(
|
|
|
|
/* selector */ state => state['features/base/participants'].dominantSpeaker,
|
2021-08-19 21:56:45 +00:00
|
|
|
/* listener */ (dominantSpeaker, store) => updateRemoteParticipants(store));
|