您最多选择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 { Toolbar } from '../../toolbar';
  9. import { HideNotificationBarStyle } from '../../unsupported-browser';
  10. declare var $: Function;
  11. declare var APP: Object;
  12. /**
  13. * The conference page of the Web application.
  14. */
  15. class Conference extends Component {
  16. /**
  17. * Conference component's property types.
  18. *
  19. * @static
  20. */
  21. static propTypes = {
  22. dispatch: React.PropTypes.func
  23. }
  24. /**
  25. * Until we don't rewrite UI using react components
  26. * we use UI.start from old app. Also method translates
  27. * component right after it has been mounted.
  28. *
  29. * @inheritdoc
  30. */
  31. componentDidMount() {
  32. APP.UI.start();
  33. APP.UI.registerListeners();
  34. APP.UI.bindEvents();
  35. this.props.dispatch(connect());
  36. }
  37. /**
  38. * Disconnect from the conference when component will be
  39. * unmounted.
  40. *
  41. * @inheritdoc
  42. */
  43. componentWillUnmount() {
  44. APP.UI.unregisterListeners();
  45. APP.UI.unbindEvents();
  46. APP.conference.isJoined() && 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. <Toolbar />
  58. <div id = 'videospace'>
  59. <div
  60. className = 'videocontainer'
  61. id = 'largeVideoContainer'>
  62. <div id = 'sharedVideo'>
  63. <div id = 'sharedVideoIFrame' />
  64. </div>
  65. <div id = 'etherpad' />
  66. <Watermarks />
  67. <div id = 'dominantSpeaker'>
  68. <div className = 'dynamic-shadow' />
  69. <img
  70. id = 'dominantSpeakerAvatar'
  71. src = '' />
  72. </div>
  73. <span id = 'remoteConnectionMessage' />
  74. <div id = 'largeVideoWrapper'>
  75. <video
  76. autoPlay = { true }
  77. id = 'largeVideo'
  78. muted = 'true' />
  79. </div>
  80. <span id = 'localConnectionMessage' />
  81. <span
  82. className = 'video-state-indicator moveToCorner'
  83. id = 'videoResolutionLabel'>HD</span>
  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);