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

LargeVideo.native.js 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. useConnectivityInfoLabel = { true }
  40. zOrder = { 0 } />
  41. );
  42. }
  43. }
  44. /**
  45. * Maps (parts of) the Redux state to the associated LargeVideo's props.
  46. *
  47. * @param {Object} state - Redux state.
  48. * @private
  49. * @returns {{
  50. * _participantId: string
  51. * }}
  52. */
  53. function _mapStateToProps(state) {
  54. return {
  55. _participantId: state['features/large-video'].participantId
  56. };
  57. }
  58. export default connect(_mapStateToProps)(LargeVideo);