2017-05-24 17:01:46 +00:00
|
|
|
/* @flow */
|
|
|
|
|
2017-09-27 21:23:31 +00:00
|
|
|
import PropTypes from 'prop-types';
|
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
|
|
|
|
2017-06-10 22:50:42 +00:00
|
|
|
import styles from './styles';
|
2016-10-05 14:36:59 +00:00
|
|
|
|
|
|
|
/**
|
2017-05-24 17:01:46 +00: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 14:36:59 +00:00
|
|
|
*
|
|
|
|
* @extends Component
|
|
|
|
*/
|
2017-10-24 22:26:56 +00:00
|
|
|
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
|
|
|
|
*/
|
2017-09-27 21:23:31 +00:00
|
|
|
_participantId: PropTypes.string
|
2017-06-02 02:01:50 +00:00
|
|
|
};
|
2016-12-01 01:52:39 +00:00
|
|
|
|
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 }
|
2017-12-12 15:30:23 +00:00
|
|
|
useConnectivityInfoLabel = { true }
|
2016-10-05 14:36:59 +00:00
|
|
|
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);
|