Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

⚡️(frontend) narrow participant event subscriptions in admin panel

lebaudantoinec00fcc78e11a
diff --git a/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts b/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts
index 6d2ee4d2..b9b26e85 100644
--- a/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts
+++ b/src/frontend/src/features/rooms/livekit/hooks/usePublishSourcesManager.ts
@@ -1,4 +1,4 @@
-import { Track } from 'livekit-client'
+import { RoomEvent, Track } from 'livekit-client'
import { useCallback, useMemo } from 'react'
import { queryClient } from '@/api/queryClient'
import { keys } from '@/api/queryKeys'
@@ -43,7 +43,9 @@ export const usePublishSourcesManager = () => {
const roomId = data?.slug
const { updateParticipantsPermissions } = useUpdateParticipantsPermissions()
- const remoteParticipants = useRemoteParticipants()
+ const remoteParticipants = useRemoteParticipants({
+ updateOnlyOn: [RoomEvent.ParticipantAttributesChanged],
+ })
const unprivilegedRemoteParticipants = remoteParticipants.filter(
(participant) => !getParticipantIsRoomAdmin(participant)