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 6.0KB

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