Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

Conference.web.js 6.1KB

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