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.js 582B

12345678910111213141516171819202122232425
  1. // @flow
  2. import { MiddlewareRegistry } from '../base/redux';
  3. import { CONFERENCE_JOINED } from '../base/conference';
  4. import { statsEmitter } from './index';
  5. /**
  6. * Implements the middleware of the feature connection-indicator.
  7. *
  8. * @param {Store} store - The redux store.
  9. * @returns {Function}
  10. */
  11. // eslint-disable-next-line no-unused-vars
  12. MiddlewareRegistry.register(store => next => action => {
  13. switch (action.type) {
  14. case CONFERENCE_JOINED: {
  15. statsEmitter.startListeningForStats(action.conference);
  16. break;
  17. }
  18. }
  19. return next(action);
  20. });