You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

middleware.web.js 806B

12345678910111213141516171819202122232425
  1. import VideoLayout from '../../../modules/UI/videolayout/VideoLayout.js';
  2. import { DOMINANT_SPEAKER_CHANGED } from '../base/participants';
  3. import { MiddlewareRegistry } from '../base/redux';
  4. /**
  5. * Middleware which intercepts actions and updates the legacy component
  6. * {@code VideoLayout} as needed. The purpose of this middleware is to redux-ify
  7. * {@code VideoLayout} without having to simultaneously react-ifying it.
  8. *
  9. * @param {Store} store - The redux store.
  10. * @returns {Function}
  11. */
  12. // eslint-disable-next-line no-unused-vars
  13. MiddlewareRegistry.register(store => next => action => {
  14. const result = next(action);
  15. switch (action.type) {
  16. case DOMINANT_SPEAKER_CHANGED:
  17. VideoLayout.onDominantSpeakerChanged(action.participant.id);
  18. break;
  19. }
  20. return result;
  21. });