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

123456789101112131415161718192021222324
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { SET_SHARED_VIDEO_STATUS } from './actionTypes';
  4. /**
  5. * Reduces the Redux actions of the feature features/youtube-player.
  6. */
  7. ReducerRegistry.register('features/youtube-player', (state = {}, action) => {
  8. const { videoId, status, time, ownerId } = action;
  9. switch (action.type) {
  10. case SET_SHARED_VIDEO_STATUS:
  11. return {
  12. ...state,
  13. videoId,
  14. status,
  15. time,
  16. ownerId
  17. };
  18. default:
  19. return state;
  20. }
  21. });