2017-05-24 12:01:46 -05:00
|
|
|
/* @flow */
|
|
|
|
|
|
2017-09-27 16:23:31 -05:00
|
|
|
import PropTypes from 'prop-types';
|
2016-10-05 09:36:59 -05:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
2017-02-27 14:37:53 -06:00
|
|
|
import { ParticipantView } from '../../base/participants';
|
2016-10-05 09:36:59 -05:00
|
|
|
|
2017-06-10 17:50:42 -05:00
|
|
|
import styles from './styles';
|
2016-10-05 09:36:59 -05:00
|
|
|
|
|
|
|
|
/**
|
2017-05-24 12:01:46 -05:00
|
|
|
* Implements a React {@link Component} which represents the large video (a.k.a.
|
|
|
|
|
* the conference participant who is on the local stage) on mobile/React Native.
|
2016-10-05 09:36:59 -05:00
|
|
|
*
|
|
|
|
|
* @extends Component
|
|
|
|
|
*/
|
2017-10-24 17:26:56 -05:00
|
|
|
class LargeVideo extends Component<*> {
|
2016-11-30 19:52:39 -06:00
|
|
|
/**
|
|
|
|
|
* LargeVideo component's property types.
|
|
|
|
|
*
|
|
|
|
|
* @static
|
|
|
|
|
*/
|
|
|
|
|
static propTypes = {
|
|
|
|
|
/**
|
|
|
|
|
* The ID of the participant (to be) depicted by LargeVideo.
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
*/
|
2017-09-27 16:23:31 -05:00
|
|
|
_participantId: PropTypes.string
|
2017-06-01 21:01:50 -05:00
|
|
|
};
|
2016-11-30 19:52:39 -06:00
|
|
|
|
2016-10-05 09:36:59 -05: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 17:34:57 -06:00
|
|
|
* @private
|
2016-10-05 09:36:59 -05:00
|
|
|
* @returns {{
|
|
|
|
|
* _participantId: string
|
|
|
|
|
* }}
|
|
|
|
|
*/
|
2017-01-28 17:34:57 -06:00
|
|
|
function _mapStateToProps(state) {
|
2016-10-05 09:36:59 -05:00
|
|
|
return {
|
2017-01-17 08:44:50 -06:00
|
|
|
_participantId: state['features/large-video'].participantId
|
2016-10-05 09:36:59 -05:00
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2017-01-28 17:34:57 -06:00
|
|
|
export default connect(_mapStateToProps)(LargeVideo);
|