Files
jitsi-meet/react/features/recording/reducer.js
virtuacoplenny 735a596afe ref(recording): convert recording label to react (#1915)
* ref(recording): convert recording label to react

- Create a RecordingLabel component for displaying the current
  recording state, as reflected in the redux store. This is
  needed for 1-on-1 mode to be completely in redux.
- Update the store with the recording state so RecordingLabel
  can update itself.
- Remove previous logic for updating the non-react label, which
  includes event emitting for filmstrip visibility changes,
  as RecordingLabel is hooked into redux updates.

* ref(recording): use status and type constants from lib

* make label really dumb, move logic back to Recording
2017-08-25 11:45:30 -05:00

25 lines
594 B
JavaScript

import { ReducerRegistry } from '../base/redux';
import { HIDE_RECORDING_LABEL, RECORDING_STATE_UPDATED } from './actionTypes';
/**
* Reduces the Redux actions of the feature features/recording.
*/
ReducerRegistry.register('features/recording', (state = {}, action) => {
switch (action.type) {
case HIDE_RECORDING_LABEL:
return {
...state,
labelDisplayConfiguration: null
};
case RECORDING_STATE_UPDATED:
return {
...state,
...action.recordingState
};
default:
return state;
}
});