您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

LargeVideo.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import React, { Component } from 'react';
  2. import { connect } from 'react-redux';
  3. import { ParticipantView } from '../../base/participants';
  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. * @private
  45. * @returns {{
  46. * _participantId: string
  47. * }}
  48. */
  49. function _mapStateToProps(state) {
  50. return {
  51. _participantId: state['features/large-video'].participantId
  52. };
  53. }
  54. export default connect(_mapStateToProps)(LargeVideo);