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.

reducer.js 951B

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