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.

PreMeetingScreen.js 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // @flow
  2. import React, { PureComponent } from 'react';
  3. import { AudioSettingsButton, VideoSettingsButton } from '../../../../toolbox';
  4. import CopyMeetingUrl from './CopyMeetingUrl';
  5. import Preview from './Preview';
  6. type Props = {
  7. /**
  8. * Children component(s) to be rendered on the screen.
  9. */
  10. children: React$Node,
  11. /**
  12. * Footer to be rendered for the page (if any).
  13. */
  14. footer?: React$Node,
  15. /**
  16. * Title of the screen.
  17. */
  18. title: string,
  19. /**
  20. * True if the preview overlay should be muted, false otherwise.
  21. */
  22. videoMuted?: boolean,
  23. /**
  24. * The video track to render as preview (if omitted, the default local track will be rendered).
  25. */
  26. videoTrack?: Object
  27. }
  28. /**
  29. * Implements a pre-meeting screen that can be used at various pre-meeting phases, for example
  30. * on the prejoin screen (pre-connection) or lobby (post-connection).
  31. */
  32. export default class PreMeetingScreen extends PureComponent<Props> {
  33. /**
  34. * Implements {@code PureComponent#render}.
  35. *
  36. * @inheritdoc
  37. */
  38. render() {
  39. const { title, videoMuted, videoTrack } = this.props;
  40. return (
  41. <div
  42. className = 'premeeting-screen'
  43. id = 'lobby-screen'>
  44. <Preview
  45. videoMuted = { videoMuted }
  46. videoTrack = { videoTrack } />
  47. <div className = 'content'>
  48. <div className = 'title'>
  49. { title }
  50. </div>
  51. <CopyMeetingUrl />
  52. { this.props.children }
  53. <div className = 'media-btn-container'>
  54. <AudioSettingsButton visible = { true } />
  55. <VideoSettingsButton visible = { true } />
  56. </div>
  57. { this.props.footer }
  58. </div>
  59. </div>
  60. );
  61. }
  62. }