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

Conference.web.js 5.9KB

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