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

LargeVideo.native.js 1.5KB

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