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.web.js 3.0KB

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