Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

middleware.ts 621B

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