-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display raised hand in webcam too
- Loading branch information
Showing
3 changed files
with
60 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/components/media-elements/videos/video/participant.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import { useAppSelector } from '../../../../store'; | ||
import { participantsSelector } from '../../../../store/slices/participantSlice'; | ||
import { HandsIconSVG } from '../../../../assets/Icons/HandsIconSVG'; | ||
|
||
export interface IParticipantProps { | ||
userId: string; | ||
name: string; | ||
isLocal: boolean; | ||
} | ||
|
||
const Participant = ({ userId, name, isLocal }: IParticipantProps) => { | ||
const raisedHand = useAppSelector( | ||
(state) => | ||
participantsSelector.selectById(state, userId)?.metadata.raisedHand, | ||
); | ||
|
||
return ( | ||
<div className="name absolute bottom-4 left-4 text-sm font-medium text-white z-10"> | ||
{name} {isLocal ? '(me)' : null} | ||
{raisedHand ? <HandsIconSVG classes="h-4 w-auto" /> : null} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Participant; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters