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.native.js 744B

12345678910111213141516171819202122232425262728293031
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { RESET_SHARED_VIDEO_STATUS, SET_SHARED_VIDEO_STATUS } from './actionTypes';
  4. const initialState = {};
  5. /**
  6. * Reduces the Redux actions of the feature features/shared-video.
  7. */
  8. ReducerRegistry.register('features/shared-video', (state = initialState, action) => {
  9. const { videoUrl, status, time, ownerId, muted, volume } = action;
  10. switch (action.type) {
  11. case RESET_SHARED_VIDEO_STATUS:
  12. return initialState;
  13. case SET_SHARED_VIDEO_STATUS:
  14. return {
  15. ...state,
  16. muted,
  17. ownerId,
  18. status,
  19. time,
  20. videoUrl,
  21. volume
  22. };
  23. default:
  24. return state;
  25. }
  26. });