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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. declare var interfaceConfig: Object;
  14. /**
  15. * The conference page of the Web application.
  16. */
  17. class Conference extends Component {
  18. /**
  19. * Conference component's property types.
  20. *
  21. * @static
  22. */
  23. static propTypes = {
  24. dispatch: React.PropTypes.func
  25. };
  26. /**
  27. * Until we don't rewrite UI using react components
  28. * we use UI.start from old app. Also method translates
  29. * component right after it has been mounted.
  30. *
  31. * @inheritdoc
  32. */
  33. componentDidMount() {
  34. APP.UI.start();
  35. APP.UI.registerListeners();
  36. APP.UI.bindEvents();
  37. this.props.dispatch(connect());
  38. }
  39. /**
  40. * Disconnect from the conference when component will be
  41. * unmounted.
  42. *
  43. * @inheritdoc
  44. */
  45. componentWillUnmount() {
  46. APP.UI.stopDaemons();
  47. APP.UI.unregisterListeners();
  48. APP.UI.unbindEvents();
  49. APP.conference.isJoined() && this.props.dispatch(disconnect());
  50. }
  51. /**
  52. * Implements React's {@link Component#render()}.
  53. *
  54. * @inheritdoc
  55. * @returns {ReactElement}
  56. */
  57. render() {
  58. const { filmStripOnly } = interfaceConfig;
  59. return (
  60. <div id = 'videoconference_page'>
  61. <div id = 'videospace'>
  62. <LargeVideo />
  63. <Filmstrip displayToolbox = { filmStripOnly } />
  64. </div>
  65. { filmStripOnly ? null : <Toolbox /> }
  66. <DialogContainer />
  67. <OverlayContainer />
  68. {/*
  69. * Temasys automatically injects a notification bar, if
  70. * necessary, displayed at the top of the page notifying that
  71. * WebRTC is not installed or supported. We do not need/want
  72. * the notification bar in question because we have whole pages
  73. * dedicated to the respective scenarios.
  74. */}
  75. <HideNotificationBarStyle />
  76. </div>
  77. );
  78. }
  79. }
  80. export default reactReduxConnect()(Conference);