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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 { Filmstrip } from '../../filmstrip';
  7. import { LargeVideo } from '../../large-video';
  8. import { OverlayContainer } from '../../overlay';
  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.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. <div id = 'videospace'>
  60. <LargeVideo />
  61. <Filmstrip />
  62. </div>
  63. <Toolbox />
  64. <DialogContainer />
  65. <OverlayContainer />
  66. {/*
  67. * Temasys automatically injects a notification bar, if
  68. * necessary, displayed at the top of the page notifying that
  69. * WebRTC is not installed or supported. We do not need/want
  70. * the notification bar in question because we have whole pages
  71. * dedicated to the respective scenarios.
  72. */}
  73. <HideNotificationBarStyle />
  74. </div>
  75. );
  76. }
  77. }
  78. export default reactReduxConnect()(Conference);