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

Conference.web.js 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 { Toolbox } from '../../toolbox';
  9. import { HideNotificationBarStyle } from '../../unsupported-browser';
  10. import { VideoStatusLabel } from '../../video-status-label';
  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.stopDaemons();
  46. APP.UI.unregisterListeners();
  47. APP.UI.unbindEvents();
  48. APP.conference.isJoined() && this.props.dispatch(disconnect());
  49. }
  50. /**
  51. * Implements React's {@link Component#render()}.
  52. *
  53. * @inheritdoc
  54. * @returns {ReactElement}
  55. */
  56. render() {
  57. return (
  58. <div id = 'videoconference_page'>
  59. <Toolbox />
  60. <div id = 'videospace'>
  61. <div
  62. className = 'videocontainer'
  63. id = 'largeVideoContainer'>
  64. <div id = 'sharedVideo'>
  65. <div id = 'sharedVideoIFrame' />
  66. </div>
  67. <div id = 'etherpad' />
  68. <Watermarks />
  69. <div id = 'dominantSpeaker'>
  70. <div className = 'dynamic-shadow' />
  71. <img
  72. id = 'dominantSpeakerAvatar'
  73. src = '' />
  74. </div>
  75. <span id = 'remoteConnectionMessage' />
  76. <div id = 'largeVideoWrapper'>
  77. <video
  78. autoPlay = { true }
  79. id = 'largeVideo'
  80. muted = 'true' />
  81. </div>
  82. <span id = 'localConnectionMessage' />
  83. <VideoStatusLabel />
  84. <span
  85. className
  86. = 'video-state-indicator centeredVideoLabel'
  87. id = 'recordingLabel'>
  88. <span id = 'recordingLabelText' />
  89. <img
  90. className = 'recordingSpinner'
  91. id = 'recordingSpinner'
  92. src = 'images/spin.svg' />
  93. </span>
  94. </div>
  95. <div className = 'filmstrip'>
  96. <div
  97. className = 'filmstrip__videos'
  98. id = 'remoteVideos'>
  99. <span
  100. className = 'videocontainer'
  101. id = 'localVideoContainer'>
  102. <div className = 'videocontainer__background' />
  103. <span id = 'localVideoWrapper' />
  104. <audio
  105. autoPlay = { true }
  106. id = 'localAudio'
  107. muted = { true } />
  108. <div className = 'videocontainer__toolbar' />
  109. <div className = 'videocontainer__toptoolbar' />
  110. <div
  111. className
  112. = 'videocontainer__hoverOverlay' />
  113. </span>
  114. <audio
  115. id = 'userJoined'
  116. preload = 'auto'
  117. src = 'sounds/joined.wav' />
  118. <audio
  119. id = 'userLeft'
  120. preload = 'auto'
  121. src = 'sounds/left.wav' />
  122. </div>
  123. </div>
  124. </div>
  125. <DialogContainer />
  126. <OverlayContainer />
  127. <HideNotificationBarStyle />
  128. </div>
  129. );
  130. }
  131. }
  132. export default reactReduxConnect()(Conference);