feat(video-quality): hide if recorder or interfaceConfig specified it (#2166)

This commit is contained in:
virtuacoplenny
2017-11-22 02:18:08 -08:00
committed by Saúl Ibarra Corretgé
parent 980aa9b39a
commit 03e68b0e4b
3 changed files with 49 additions and 6 deletions

View File

@@ -31,6 +31,12 @@ class Conference extends Component<*> {
* @static
*/
static propTypes = {
/**
* Whether or not the current local user is recording the conference.
*
*/
_isRecording: PropTypes.bool,
dispatch: PropTypes.func
};
@@ -92,14 +98,18 @@ class Conference extends Component<*> {
* @returns {ReactElement}
*/
render() {
const { filmStripOnly } = interfaceConfig;
const { filmStripOnly, VIDEO_QUALITY_LABEL_DISABLED } = interfaceConfig;
const hideVideoQualityLabel = filmStripOnly
|| VIDEO_QUALITY_LABEL_DISABLED
|| this.props._isRecording;
return (
<div
id = 'videoconference_page'
onMouseMove = { this._onShowToolbar }>
<div id = 'videospace'>
<LargeVideo />
<LargeVideo
hideVideoQualityLabel = { hideVideoQualityLabel } />
<Filmstrip filmstripOnly = { filmStripOnly } />
</div>
@@ -132,4 +142,20 @@ class Conference extends Component<*> {
}
}
export default reactReduxConnect()(Conference);
/**
* Maps (parts of) the Redux state to the associated props for the
* {@code Conference} component.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _isRecording: boolean
* }}
*/
function _mapStateToProps(state) {
return {
_isRecording: state['features/base/config'].iAmRecorder
};
}
export default reactReduxConnect(_mapStateToProps)(Conference);