2022-11-10 08:45:56 +00:00
|
|
|
import StateListenerRegistry from '../base/redux/StateListenerRegistry';
|
2021-08-23 23:02:41 +00:00
|
|
|
|
2022-05-06 10:18:57 +00:00
|
|
|
import { isFilmstripScrollVisible, updateRemoteParticipants } from './functions';
|
2021-08-23 23:02:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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));
|
|
|
|
|
2022-04-14 17:07:17 +00:00
|
|
|
/**
|
|
|
|
* Listens for changes to the remote screenshare participants to recompute the reordered list of the remote endpoints.
|
|
|
|
*/
|
|
|
|
StateListenerRegistry.register(
|
2022-04-29 14:32:16 +00:00
|
|
|
/* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants,
|
|
|
|
/* listener */ (sortedRemoteVirtualScreenshareParticipants, store) => updateRemoteParticipants(store));
|
2022-04-14 17:07:17 +00:00
|
|
|
|
2021-08-23 23:02:41 +00:00
|
|
|
/**
|
|
|
|
* 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));
|
2022-05-06 10:18:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Listens for changes in the filmstrip scroll visibility.
|
|
|
|
*/
|
|
|
|
StateListenerRegistry.register(
|
|
|
|
/* selector */ state => isFilmstripScrollVisible(state),
|
|
|
|
/* listener */ (_, store) => updateRemoteParticipants(store));
|