您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Conference.web.js 5.8KB

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