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.

12345678910111213141516171819202122232425262728293031
  1. import { ReducerRegistry } from '../../base/redux';
  2. import {
  3. _SET_APP_STATE_LISTENER,
  4. _SET_BACKGROUND_VIDEO_MUTED,
  5. APP_STATE_CHANGED
  6. } from './actionTypes';
  7. ReducerRegistry.register('features/background', (state = {}, action) => {
  8. switch (action.type) {
  9. case _SET_APP_STATE_LISTENER:
  10. return {
  11. ...state,
  12. appStateListener: action.listener
  13. };
  14. case _SET_BACKGROUND_VIDEO_MUTED:
  15. return {
  16. ...state,
  17. videoMuted: action.muted
  18. };
  19. case APP_STATE_CHANGED:
  20. return {
  21. ...state,
  22. appState: action.appState
  23. };
  24. }
  25. return state;
  26. });