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.

MeetingParticipantItem.js 866B

12345678910111213141516171819202122232425262728293031323334
  1. // @flow
  2. import React from 'react';
  3. import { useSelector } from 'react-redux';
  4. import {
  5. getIsParticipantAudioMuted,
  6. getIsParticipantVideoMuted
  7. } from '../../../base/tracks';
  8. import { MediaState } from '../../constants';
  9. import ParticipantItem from './ParticipantItem';
  10. type Props = {
  11. /**
  12. * Participant reference
  13. */
  14. participant: Object
  15. };
  16. export const MeetingParticipantItem = ({ participant: p }: Props) => {
  17. const isAudioMuted = useSelector(getIsParticipantAudioMuted(p));
  18. const isVideoMuted = useSelector(getIsParticipantVideoMuted(p));
  19. return (
  20. <ParticipantItem
  21. audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted }
  22. name = { p.name }
  23. participant = { p }
  24. videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted } />
  25. );
  26. };