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 523B

1234567891011121314151617181920212223
  1. // @flow
  2. import UIEvents from '../../../../service/UI/UIEvents';
  3. import { MiddlewareRegistry } from '../redux';
  4. import { TOGGLE_SCREENSHARING } from '../tracks/actionTypes';
  5. import './middleware.any';
  6. declare var APP: Object;
  7. MiddlewareRegistry.register((/* store */) => next => action => {
  8. switch (action.type) {
  9. case TOGGLE_SCREENSHARING: {
  10. if (typeof APP === 'object') {
  11. APP.UI.emitEvent(UIEvents.TOGGLE_SCREENSHARING);
  12. }
  13. break;
  14. }
  15. }
  16. return next(action);
  17. });