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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 { OverlayContainer } from '../../overlay';
  8. import { StatusLabel } from '../../status-label';
  9. import { Toolbox } from '../../toolbox';
  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. <Toolbox />
  59. <div id = 'videospace'>
  60. <div
  61. className = 'videocontainer'
  62. id = 'largeVideoContainer'>
  63. <div id = 'sharedVideo'>
  64. <div id = 'sharedVideoIFrame' />
  65. </div>
  66. <div id = 'etherpad' />
  67. <Watermarks />
  68. <div id = 'dominantSpeaker'>
  69. <div className = 'dynamic-shadow' />
  70. <img
  71. id = 'dominantSpeakerAvatar'
  72. src = '' />
  73. </div>
  74. <span id = 'remoteConnectionMessage' />
  75. <div id = 'largeVideoWrapper'>
  76. <video
  77. autoPlay = { true }
  78. id = 'largeVideo'
  79. muted = 'true' />
  80. </div>
  81. <span id = 'localConnectionMessage' />
  82. <span
  83. className = 'video-state-indicator moveToCorner'
  84. id = 'videoResolutionLabel'>HD</span>
  85. <StatusLabel />
  86. <span
  87. className
  88. = 'video-state-indicator centeredVideoLabel'
  89. id = 'recordingLabel'>
  90. <span id = 'recordingLabelText' />
  91. <img
  92. className = 'recordingSpinner'
  93. id = 'recordingSpinner'
  94. src = 'images/spin.svg' />
  95. </span>
  96. </div>
  97. <div className = 'filmstrip'>
  98. <div
  99. className = 'filmstrip__videos'
  100. id = 'remoteVideos'>
  101. <span
  102. className = 'videocontainer'
  103. id = 'localVideoContainer'>
  104. <div className = 'videocontainer__background' />
  105. <span id = 'localVideoWrapper' />
  106. <audio
  107. autoPlay = { true }
  108. id = 'localAudio'
  109. muted = { true } />
  110. <div className = 'videocontainer__toolbar' />
  111. <div className = 'videocontainer__toptoolbar' />
  112. <div
  113. className
  114. = 'videocontainer__hoverOverlay' />
  115. </span>
  116. <audio
  117. id = 'userJoined'
  118. preload = 'auto'
  119. src = 'sounds/joined.wav' />
  120. <audio
  121. id = 'userLeft'
  122. preload = 'auto'
  123. src = 'sounds/left.wav' />
  124. </div>
  125. </div>
  126. </div>
  127. <DialogContainer />
  128. <OverlayContainer />
  129. <HideNotificationBarStyle />
  130. </div>
  131. );
  132. }
  133. }
  134. export default reactReduxConnect()(Conference);