From 8f6b767cbc40b05226701a3ad1ef4883b77c9703 Mon Sep 17 00:00:00 2001 From: SujithThirumalaisamy Date: Thu, 10 Apr 2025 01:00:55 +0530 Subject: [PATCH] Fixed ProfileImage and ParticipantCount --- app/custom/CustomControlBar.tsx | 14 +++++--------- app/custom/ParticipantList.tsx | 10 +++++++++- app/custom/layout/CustomVideoLayout.tsx | 16 +++------------- app/rooms/[roomName]/PageClientImpl.tsx | 2 +- app/svg/camera.tsx | 4 ++-- app/svg/screen-share.tsx | 6 +++--- lib/ParticipantTile.tsx | 6 +++--- 7 files changed, 26 insertions(+), 32 deletions(-) diff --git a/app/custom/CustomControlBar.tsx b/app/custom/CustomControlBar.tsx index ddca0ca..4e93c33 100644 --- a/app/custom/CustomControlBar.tsx +++ b/app/custom/CustomControlBar.tsx @@ -17,16 +17,12 @@ import { ScreenShareOnSVG } from '../svg/screen-share'; import { useCustomLayoutContext } from '../contexts/layout-context'; import { useToast } from './toast/use-toast'; -interface CustomControlBarProps { - room: Room; - roomName: string; -} - -export function CustomControlBar({ room, roomName }: CustomControlBarProps) { +export function CustomControlBar() { + const room = useRoomContext(); const recordingEndpoint = process.env.NEXT_PUBLIC_LK_RECORD_ENDPOINT; const { localParticipant } = useLocalParticipant(); const [isRecordingRequestPending, setIsRecordingRequestPending] = useState(false); - const [participantCount, setParticipantCount] = useState(1); + const [participantCount, setParticipantCount] = useState(room.numParticipants); const { dispatch } = useLayoutContext().widget; const { isParticipantsListOpen, isChatOpen } = useCustomLayoutContext(); const { toast } = useToast(); @@ -96,7 +92,7 @@ export function CustomControlBar({ room, roomName }: CustomControlBarProps) { } else { response = await fetch( recordingEndpoint + - `/start?roomName=${room.name}&now=${now}&identity=${localParticipant.identity}`, + `/start?roomName=${room.name}&now=${now}&identity=${localParticipant.identity}`, ); } if (response.ok) { @@ -150,7 +146,7 @@ export function CustomControlBar({ room, roomName }: CustomControlBarProps) { return (
- {roomName} + {room.name}