Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
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.
 
 
 
 
 
 
jitsi-meet/react/features/status-label/components/StatusLabel.js

58 lines
1.3 KiB

import React, { Component } from 'react';
import { connect } from 'react-redux';
import AudioOnlyLabel from './AudioOnlyLabel';
/**
* Component responsible for displaying a label that indicates some state of the
* current conference. The AudioOnlyLabel component will be displayed when the
* conference is in audio only mode.
*/
export class StatusLabel extends Component {
/**
* StatusLabel component's property types.
*
* @static
*/
static propTypes = {
/**
* The redux store representation of the current conference.
*/
_conference: React.PropTypes.object
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement|null}
*/
render() {
if (!this.props._conference.audioOnly) {
return null;
}
return (
<div className = 'moveToCorner'>
<AudioOnlyLabel />
</div>
);
}
}
/**
* Maps (parts of) the Redux state to the associated StatusLabel's props.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _conference: Object,
* }}
*/
function _mapStateToProps(state) {
return {
_conference: state['features/base/conference']
};
}
export default connect(_mapStateToProps)(StatusLabel);