Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

middleware.native.js 669B

12345678910111213141516171819202122232425262728
  1. // @flow
  2. import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants';
  3. import { MiddlewareRegistry } from '../base/redux';
  4. import { updateRemoteParticipants, updateRemoteParticipantsOnLeave } from './functions';
  5. import './subscriber';
  6. /**
  7. * The middleware of the feature Filmstrip.
  8. */
  9. MiddlewareRegistry.register(store => next => action => {
  10. const result = next(action);
  11. switch (action.type) {
  12. case PARTICIPANT_JOINED: {
  13. updateRemoteParticipants(store);
  14. break;
  15. }
  16. case PARTICIPANT_LEFT: {
  17. updateRemoteParticipantsOnLeave(store, action.participant?.id);
  18. break;
  19. }
  20. }
  21. return result;
  22. });