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

32 lines
716 B
JavaScript

import { HIDE_RECORDING_LABEL, RECORDING_STATE_UPDATED } from './actionTypes';
/**
* Hides any displayed recording label, regardless of current recording state.
*
* @returns {{
* type: HIDE_RECORDING_LABEL
* }}
*/
export function hideRecordingLabel() {
return {
type: HIDE_RECORDING_LABEL
};
}
/**
* Updates the redux state for the recording feature.
*
* @param {Object} recordingState - The new state to merge with the existing
* state in redux.
* @returns {{
* type: RECORDING_STATE_UPDATED,
* recordingState: Object
* }}
*/
export function updateRecordingState(recordingState = {}) {
return {
type: RECORDING_STATE_UPDATED,
recordingState
};
}