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

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