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.

LargeVideo.js 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import React, { Component } from 'react';
  2. import { connect } from 'react-redux';
  3. import { ParticipantView } from '../../conference';
  4. import { styles } from './styles';
  5. /**
  6. * Large video React component.
  7. *
  8. * @extends Component
  9. */
  10. class LargeVideo extends Component {
  11. /**
  12. * LargeVideo component's property types.
  13. *
  14. * @static
  15. */
  16. static propTypes = {
  17. /**
  18. * The ID of the participant (to be) depicted by LargeVideo.
  19. *
  20. * @private
  21. */
  22. _participantId: React.PropTypes.string
  23. }
  24. /**
  25. * Implements React's {@link Component#render()}.
  26. *
  27. * @inheritdoc
  28. * @returns {ReactElement}
  29. */
  30. render() {
  31. return (
  32. <ParticipantView
  33. avatarStyle = { styles.avatar }
  34. participantId = { this.props._participantId }
  35. style = { styles.largeVideo }
  36. zOrder = { 0 } />
  37. );
  38. }
  39. }
  40. /**
  41. * Maps (parts of) the Redux state to the associated LargeVideo's props.
  42. *
  43. * @param {Object} state - Redux state.
  44. * @returns {{
  45. * _participantId: string
  46. * }}
  47. */
  48. function mapStateToProps(state) {
  49. return {
  50. _participantId: state['features/largeVideo'].participantId
  51. };
  52. }
  53. export default connect(mapStateToProps)(LargeVideo);