Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

VideoMenuTriggerButton.tsx 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import React from 'react';
  2. import LocalVideoMenuTriggerButton from '../../../video-menu/components/web/LocalVideoMenuTriggerButton';
  3. import RemoteVideoMenuTriggerButton from '../../../video-menu/components/web/RemoteVideoMenuTriggerButton';
  4. interface IProps {
  5. /**
  6. * Hide popover callback.
  7. */
  8. hidePopover?: Function;
  9. /**
  10. * Whether or not the button is for the local participant.
  11. */
  12. local?: boolean;
  13. /**
  14. * The id of the participant for which the button is.
  15. */
  16. participantId?: string;
  17. /**
  18. * Whether popover is visible or not.
  19. */
  20. popoverVisible?: boolean;
  21. /**
  22. * Show popover callback.
  23. */
  24. showPopover?: Function;
  25. /**
  26. * The type of thumbnail.
  27. */
  28. thumbnailType: string;
  29. /**
  30. * Whether or not the component is visible.
  31. */
  32. visible: boolean;
  33. }
  34. // eslint-disable-next-line no-confusing-arrow
  35. const VideoMenuTriggerButton = ({
  36. hidePopover,
  37. local,
  38. participantId = '',
  39. popoverVisible,
  40. showPopover,
  41. thumbnailType,
  42. visible
  43. }: IProps) => local
  44. ? (
  45. <span id = 'localvideomenu'>
  46. <LocalVideoMenuTriggerButton
  47. buttonVisible = { visible }
  48. hidePopover = { hidePopover }
  49. popoverVisible = { popoverVisible }
  50. showPopover = { showPopover }
  51. thumbnailType = { thumbnailType } />
  52. </span>
  53. )
  54. : (
  55. <span id = 'remotevideomenu'>
  56. <RemoteVideoMenuTriggerButton
  57. buttonVisible = { visible }
  58. hidePopover = { hidePopover }
  59. participantID = { participantId }
  60. popoverVisible = { popoverVisible }
  61. showPopover = { showPopover }
  62. thumbnailType = { thumbnailType } />
  63. </span>
  64. );
  65. export default VideoMenuTriggerButton;