您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MeetingParticipantItem.js 863B

123456789101112131415161718192021222324252627282930313233
  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 }: Props) => {
  17. const isAudioMuted = useSelector(getIsParticipantAudioMuted(participant));
  18. const isVideoMuted = useSelector(getIsParticipantVideoMuted(participant));
  19. return (
  20. <ParticipantItem
  21. audioMuteState = { isAudioMuted ? MediaState.Muted : MediaState.Unmuted }
  22. participant = { participant }
  23. videoMuteState = { isVideoMuted ? MediaState.Muted : MediaState.Unmuted } />
  24. );
  25. };