2016-10-05 14:36:59 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
2017-02-27 20:37:53 +00:00
|
|
|
import { ParticipantView } from '../../base/participants';
|
2016-10-05 14:36:59 +00:00
|
|
|
|
|
|
|
import { styles } from './styles';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Large video React component.
|
|
|
|
*
|
|
|
|
* @extends Component
|
|
|
|
*/
|
|
|
|
class LargeVideo extends Component {
|
2016-12-01 01:52:39 +00:00
|
|
|
/**
|
|
|
|
* LargeVideo component's property types.
|
|
|
|
*
|
|
|
|
* @static
|
|
|
|
*/
|
|
|
|
static propTypes = {
|
|
|
|
/**
|
|
|
|
* The ID of the participant (to be) depicted by LargeVideo.
|
|
|
|
*
|
|
|
|
* @private
|
|
|
|
*/
|
|
|
|
_participantId: React.PropTypes.string
|
|
|
|
}
|
|
|
|
|
2016-10-05 14:36:59 +00:00
|
|
|
/**
|
|
|
|
* Implements React's {@link Component#render()}.
|
|
|
|
*
|
|
|
|
* @inheritdoc
|
|
|
|
* @returns {ReactElement}
|
|
|
|
*/
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<ParticipantView
|
|
|
|
avatarStyle = { styles.avatar }
|
|
|
|
participantId = { this.props._participantId }
|
|
|
|
style = { styles.largeVideo }
|
|
|
|
zOrder = { 0 } />
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Maps (parts of) the Redux state to the associated LargeVideo's props.
|
|
|
|
*
|
|
|
|
* @param {Object} state - Redux state.
|
2017-01-28 23:34:57 +00:00
|
|
|
* @private
|
2016-10-05 14:36:59 +00:00
|
|
|
* @returns {{
|
|
|
|
* _participantId: string
|
|
|
|
* }}
|
|
|
|
*/
|
2017-01-28 23:34:57 +00:00
|
|
|
function _mapStateToProps(state) {
|
2016-10-05 14:36:59 +00:00
|
|
|
return {
|
2017-01-17 14:44:50 +00:00
|
|
|
_participantId: state['features/large-video'].participantId
|
2016-10-05 14:36:59 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-01-28 23:34:57 +00:00
|
|
|
export default connect(_mapStateToProps)(LargeVideo);
|