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.

reducer.js 716B

1234567891011121314151617181920212223242526272829
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY,
  4. SET_FILMSTRIP_VISIBILITY
  5. } from './actionTypes';
  6. const DEFAULT_STATE = {
  7. remoteVideosVisible: true,
  8. visible: true
  9. };
  10. ReducerRegistry.register(
  11. 'features/filmstrip',
  12. (state = DEFAULT_STATE, action) => {
  13. switch (action.type) {
  14. case SET_FILMSTRIP_REMOTE_VIDEOS_VISIBLITY:
  15. return {
  16. ...state,
  17. remoteVideosVisible: action.remoteVideosVisible
  18. };
  19. case SET_FILMSTRIP_VISIBILITY:
  20. return {
  21. ...state,
  22. visible: action.visible
  23. };
  24. }
  25. return state;
  26. });