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

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