Open source video conferencing app powered by LiveKit. Built with Django and React.
🚸(frontend) add sound notification for lobby
lebaudantoine52a7a6efabdb
diff --git a/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx b/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsxindex e916645d..0e731d4e 100644--- a/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx+++ b/src/frontend/src/features/notifications/components/WaitingParticipantNotification.tsx@@ -10,10 +10,14 @@ import { usePrevious } from '@/hooks/usePrevious'import { WaitingParticipant } from '@/features/rooms/api/listWaitingParticipants'import { useWaitingParticipants } from '@/features/rooms/hooks/useWaitingParticipants'import { useSidePanel } from '@/features/rooms/livekit/hooks/useSidePanel'+import { useNotificationSound } from '../hooks/useSoundNotification'+import { NotificationType } from '@/features/notifications'export const NOTIFICATION_DISPLAY_DURATION = 10000export const WaitingParticipantNotification = () => {+ const { triggerNotificationSound } = useNotificationSound()+const { t } = useTranslation('notifications', {keyPrefix: 'waitingParticipants',})@@ -37,6 +41,9 @@ export const WaitingParticipantNotification = () => {!isParticipantsOpen) {setShowQuickActionsMessage(true)++ triggerNotificationSound(NotificationType.ParticipantJoined)+if (timerRef.current !== null) {clearTimeout(timerRef.current)}@@ -48,7 +55,12 @@ export const WaitingParticipantNotification = () => {// Hide notification when the participant count changessetShowQuickActionsMessage(false)}- }, [waitingParticipants, prevWaitingParticipant, isParticipantsOpen])+ }, [+ waitingParticipants,+ prevWaitingParticipant,+ isParticipantsOpen,+ triggerNotificationSound,+ ])useEffect(() => {// This cleanup function will only run when the component unmounts