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.

Conference.web.js 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /* global $, APP */
  2. import React, { Component } from 'react';
  3. import { connect as reactReduxConnect } from 'react-redux';
  4. import { connect, disconnect } from '../../base/connection';
  5. import { Watermarks } from '../../base/react';
  6. import { FeedbackButton } from '../../feedback';
  7. import { OverlayContainer } from '../../overlay';
  8. /**
  9. * For legacy reasons, inline style for display none.
  10. *
  11. * @private
  12. * @type {{
  13. * display: string
  14. * }}
  15. */
  16. const _DISPLAY_NONE_STYLE = {
  17. display: 'none'
  18. };
  19. /**
  20. * The conference page of the Web application.
  21. */
  22. class Conference extends Component {
  23. /**
  24. * Conference component's property types.
  25. *
  26. * @static
  27. */
  28. static propTypes = {
  29. dispatch: React.PropTypes.func
  30. }
  31. /**
  32. * Until we don't rewrite UI using react components
  33. * we use UI.start from old app. Also method translates
  34. * component right after it has been mounted.
  35. *
  36. * @inheritdoc
  37. */
  38. componentDidMount() {
  39. APP.UI.start();
  40. // XXX Temporary solution until we add React translation.
  41. APP.translation.translateElement($('#videoconference_page'));
  42. this.props.dispatch(connect());
  43. }
  44. /**
  45. * Disconnect from the conference when component will be
  46. * unmounted.
  47. *
  48. * @inheritdoc
  49. */
  50. componentWillUnmount() {
  51. this.props.dispatch(disconnect());
  52. }
  53. /**
  54. * Implements React's {@link Component#render()}.
  55. *
  56. * @inheritdoc
  57. * @returns {ReactElement}
  58. */
  59. render() {
  60. return (
  61. <div id = 'videoconference_page'>
  62. <div id = 'mainToolbarContainer'>
  63. <div
  64. className = 'notice'
  65. id = 'notice'
  66. style = { _DISPLAY_NONE_STYLE }>
  67. <span
  68. className = 'noticeText'
  69. id = 'noticeText' />
  70. </div>
  71. <div
  72. className = 'toolbar'
  73. id = 'mainToolbar' />
  74. </div>
  75. <div
  76. className = 'hide'
  77. id = 'subject' />
  78. <div
  79. className = 'toolbar'
  80. id = 'extendedToolbar'>
  81. <div id = 'extendedToolbarButtons' />
  82. <FeedbackButton />
  83. <div id = 'sideToolbarContainer' />
  84. </div>
  85. <div id = 'videospace'>
  86. <div
  87. className = 'videocontainer'
  88. id = 'largeVideoContainer'>
  89. <div id = 'sharedVideo'>
  90. <div id = 'sharedVideoIFrame' />
  91. </div>
  92. <div id = 'etherpad' />
  93. <Watermarks />
  94. <div id = 'dominantSpeaker'>
  95. <div className = 'dynamic-shadow' />
  96. <img
  97. id = 'dominantSpeakerAvatar'
  98. src = '' />
  99. </div>
  100. <span id = 'remoteConnectionMessage' />
  101. <div id = 'largeVideoWrapper'>
  102. <video
  103. autoPlay = { true }
  104. id = 'largeVideo'
  105. muted = 'true' />
  106. </div>
  107. <span id = 'localConnectionMessage' />
  108. <span
  109. className = 'video-state-indicator moveToCorner'
  110. id = 'videoResolutionLabel'>HD</span>
  111. <span
  112. className
  113. = 'video-state-indicator centeredVideoLabel'
  114. id = 'recordingLabel'>
  115. <span id = 'recordingLabelText' />
  116. <img
  117. className = 'recordingSpinner'
  118. id = 'recordingSpinner'
  119. src = 'images/spin.svg' />
  120. </span>
  121. </div>
  122. <div className = 'filmstrip'>
  123. <div
  124. className = 'filmstrip__videos'
  125. id = 'remoteVideos'>
  126. <span
  127. className = 'videocontainer'
  128. id = 'localVideoContainer'>
  129. <div className = 'videocontainer__background' />
  130. <span id = 'localVideoWrapper' />
  131. <audio
  132. autoPlay = { true }
  133. id = 'localAudio'
  134. muted = { true } />
  135. <div className = 'videocontainer__toolbar' />
  136. <div className = 'videocontainer__toptoolbar' />
  137. <div
  138. className
  139. = 'videocontainer__hoverOverlay' />
  140. </span>
  141. <audio
  142. id = 'userJoined'
  143. preload = 'auto'
  144. src = 'sounds/joined.wav' />
  145. <audio
  146. id = 'userLeft'
  147. preload = 'auto'
  148. src = 'sounds/left.wav' />
  149. </div>
  150. </div>
  151. </div>
  152. <OverlayContainer />
  153. </div>
  154. );
  155. }
  156. }
  157. export default reactReduxConnect()(Conference);