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

12345678910111213141516171819202122232425262728
  1. import UIEvents from '../../../service/UI/UIEvents';
  2. import { MiddlewareRegistry } from '../base/redux';
  3. import {
  4. SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY,
  5. SET_FILMSTRIP_VISIBILITY
  6. } from './actionTypes';
  7. declare var APP: Object;
  8. // eslint-disable-next-line no-unused-vars
  9. MiddlewareRegistry.register(store => next => action => {
  10. const result = next(action);
  11. switch (action.type) {
  12. case SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY:
  13. case SET_FILMSTRIP_VISIBILITY: {
  14. if (typeof APP !== 'undefined') {
  15. APP.UI.emitEvent(UIEvents.UPDATED_FILMSTRIP_DISPLAY);
  16. }
  17. break;
  18. }
  19. }
  20. return result;
  21. });