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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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 { Notice } from '../../toolbar';
  10. import { HideNotificationBarStyle } from '../../unsupported-browser';
  11. declare var $: Function;
  12. declare var APP: Object;
  13. /**
  14. * The conference page of the Web application.
  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. APP.UI.registerListeners();
  35. APP.UI.bindEvents();
  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. APP.UI.unregisterListeners();
  46. APP.UI.unbindEvents();
  47. APP.conference.isJoined() && this.props.dispatch(disconnect());
  48. }
  49. /**
  50. * Implements React's {@link Component#render()}.
  51. *
  52. * @inheritdoc
  53. * @returns {ReactElement}
  54. */
  55. render() {
  56. return (
  57. <div id = 'videoconference_page'>
  58. <div id = 'mainToolbarContainer'>
  59. <Notice />
  60. <div
  61. className = 'toolbar'
  62. id = 'mainToolbar' />
  63. </div>
  64. <div
  65. className = 'hide'
  66. id = 'subject' />
  67. <div
  68. className = 'toolbar'
  69. id = 'extendedToolbar'>
  70. <div id = 'extendedToolbarButtons' />
  71. <FeedbackButton />
  72. <div id = 'sideToolbarContainer' />
  73. </div>
  74. <div id = 'videospace'>
  75. <div
  76. className = 'videocontainer'
  77. id = 'largeVideoContainer'>
  78. <div id = 'sharedVideo'>
  79. <div id = 'sharedVideoIFrame' />
  80. </div>
  81. <div id = 'etherpad' />
  82. <Watermarks />
  83. <div id = 'dominantSpeaker'>
  84. <div className = 'dynamic-shadow' />
  85. <img
  86. id = 'dominantSpeakerAvatar'
  87. src = '' />
  88. </div>
  89. <span id = 'remoteConnectionMessage' />
  90. <div id = 'largeVideoWrapper'>
  91. <video
  92. autoPlay = { true }
  93. id = 'largeVideo'
  94. muted = 'true' />
  95. </div>
  96. <span id = 'localConnectionMessage' />
  97. <span
  98. className = 'video-state-indicator moveToCorner'
  99. id = 'videoResolutionLabel'>HD</span>
  100. <span
  101. className
  102. = 'video-state-indicator centeredVideoLabel'
  103. id = 'recordingLabel'>
  104. <span id = 'recordingLabelText' />
  105. <img
  106. className = 'recordingSpinner'
  107. id = 'recordingSpinner'
  108. src = 'images/spin.svg' />
  109. </span>
  110. </div>
  111. <div className = 'filmstrip'>
  112. <div
  113. className = 'filmstrip__videos'
  114. id = 'remoteVideos'>
  115. <span
  116. className = 'videocontainer'
  117. id = 'localVideoContainer'>
  118. <div className = 'videocontainer__background' />
  119. <span id = 'localVideoWrapper' />
  120. <audio
  121. autoPlay = { true }
  122. id = 'localAudio'
  123. muted = { true } />
  124. <div className = 'videocontainer__toolbar' />
  125. <div className = 'videocontainer__toptoolbar' />
  126. <div
  127. className
  128. = 'videocontainer__hoverOverlay' />
  129. </span>
  130. <audio
  131. id = 'userJoined'
  132. preload = 'auto'
  133. src = 'sounds/joined.wav' />
  134. <audio
  135. id = 'userLeft'
  136. preload = 'auto'
  137. src = 'sounds/left.wav' />
  138. </div>
  139. </div>
  140. </div>
  141. <DialogContainer />
  142. <OverlayContainer />
  143. <HideNotificationBarStyle />
  144. </div>
  145. );
  146. }
  147. }
  148. export default reactReduxConnect()(Conference);