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

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. SET_SCREEN_AUDIO_SHARE_STATE,
  4. SET_SCREENSHARE_CAPTURE_FRAME_RATE,
  5. SET_SCREENSHARE_TRACKS
  6. } from './actionTypes';
  7. /**
  8. * Reduces the Redux actions of the feature features/screen-share.
  9. */
  10. ReducerRegistry.register('features/screen-share', (state = {}, action) => {
  11. const { captureFrameRate, isSharingAudio, desktopAudioTrack } = action;
  12. switch (action.type) {
  13. case SET_SCREEN_AUDIO_SHARE_STATE:
  14. return {
  15. ...state,
  16. isSharingAudio
  17. };
  18. case SET_SCREENSHARE_CAPTURE_FRAME_RATE:
  19. return {
  20. ...state,
  21. captureFrameRate
  22. };
  23. case SET_SCREENSHARE_TRACKS:
  24. return {
  25. ...state,
  26. desktopAudioTrack
  27. };
  28. default:
  29. return state;
  30. }
  31. });