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.native.js 1.4KB

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