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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. * The name of the participant.
  17. */
  18. name?: string,
  19. /**
  20. * Title of the screen.
  21. */
  22. title: string,
  23. /**
  24. * True if the preview overlay should be muted, false otherwise.
  25. */
  26. videoMuted?: boolean,
  27. /**
  28. * The video track to render as preview (if omitted, the default local track will be rendered).
  29. */
  30. videoTrack?: Object
  31. }
  32. /**
  33. * Implements a pre-meeting screen that can be used at various pre-meeting phases, for example
  34. * on the prejoin screen (pre-connection) or lobby (post-connection).
  35. */
  36. export default class PreMeetingScreen extends PureComponent<Props> {
  37. /**
  38. * Implements {@code PureComponent#render}.
  39. *
  40. * @inheritdoc
  41. */
  42. render() {
  43. const { name, title, videoMuted, videoTrack } = this.props;
  44. return (
  45. <div
  46. className = 'premeeting-screen'
  47. id = 'lobby-screen'>
  48. <Preview
  49. name = { name }
  50. videoMuted = { videoMuted }
  51. videoTrack = { videoTrack } />
  52. <div className = 'content'>
  53. <div className = 'title'>
  54. { title }
  55. </div>
  56. <CopyMeetingUrl />
  57. { this.props.children }
  58. <div className = 'media-btn-container'>
  59. <AudioSettingsButton visible = { true } />
  60. <VideoSettingsButton visible = { true } />
  61. </div>
  62. { this.props.footer }
  63. </div>
  64. </div>
  65. );
  66. }
  67. }