Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // @flow
  2. import React, { Component } from 'react';
  3. import { Watermarks } from '../../base/react';
  4. import { Captions } from '../../subtitles/';
  5. import { connect } from '../../base/redux';
  6. declare var interfaceConfig: Object;
  7. type Props = {
  8. /**
  9. * Used to determine the value of the autoplay attribute of the underlying
  10. * video element.
  11. */
  12. _noAutoPlayVideo: boolean
  13. }
  14. /**
  15. * Implements a React {@link Component} which represents the large video (a.k.a.
  16. * the conference participant who is on the local stage) on Web/React.
  17. *
  18. * @extends Component
  19. */
  20. class LargeVideo extends Component<Props> {
  21. /**
  22. * Implements React's {@link Component#render()}.
  23. *
  24. * @inheritdoc
  25. * @returns {React$Element}
  26. */
  27. render() {
  28. return (
  29. <div
  30. className = 'videocontainer'
  31. id = 'largeVideoContainer'>
  32. <div id = 'sharedVideo'>
  33. <div id = 'sharedVideoIFrame' />
  34. </div>
  35. <div id = 'etherpad' />
  36. <Watermarks />
  37. <div id = 'dominantSpeaker'>
  38. <div className = 'dynamic-shadow' />
  39. <div id = 'dominantSpeakerAvatarContainer' />
  40. </div>
  41. <div id = 'remotePresenceMessage' />
  42. <span id = 'remoteConnectionMessage' />
  43. <div id = 'largeVideoElementsContainer'>
  44. <div id = 'largeVideoBackgroundContainer' />
  45. {/*
  46. * FIXME: the architecture of elements related to the large
  47. * video and the naming. The background is not part of
  48. * largeVideoWrapper because we are controlling the size of
  49. * the video through largeVideoWrapper. That's why we need
  50. * another container for the background and the
  51. * largeVideoWrapper in order to hide/show them.
  52. */}
  53. <div id = 'largeVideoWrapper'>
  54. <video
  55. autoPlay = { !this.props._noAutoPlayVideo }
  56. id = 'largeVideo'
  57. muted = { true } />
  58. </div>
  59. </div>
  60. { interfaceConfig.DISABLE_TRANSCRIPTION_SUBTITLES
  61. || <Captions /> }
  62. </div>
  63. );
  64. }
  65. }
  66. /**
  67. * Maps (parts of) the Redux state to the associated LargeVideo props.
  68. *
  69. * @param {Object} state - The Redux state.
  70. * @private
  71. * @returns {{
  72. * _noAutoPlayVideo: boolean
  73. * }}
  74. */
  75. function _mapStateToProps(state) {
  76. const testingConfig = state['features/base/config'].testing;
  77. return {
  78. _noAutoPlayVideo: testingConfig?.noAutoPlayVideo
  79. };
  80. }
  81. export default connect(_mapStateToProps)(LargeVideo);