diff --git a/src/ConferenceCallManagerHooks.js b/src/ConferenceCallManagerHooks.js index f2e4f287..db93e51f 100644 --- a/src/ConferenceCallManagerHooks.js +++ b/src/ConferenceCallManagerHooks.js @@ -285,15 +285,26 @@ export function useGroupCallRooms(client) { const groupCalls = client.groupCallEventHandler.groupCalls.values(); const rooms = Array.from(groupCalls).map((groupCall) => groupCall.room); const sortedRooms = sortRooms(client, rooms); - setRooms(sortedRooms); + const items = sortedRooms.map((room) => { + const groupCall = client.getGroupCallForRoom(room.roomId); + + return { + room, + groupCall, + participants: [...groupCall.participants], + }; + }); + setRooms(items); } updateRooms(); client.on("GroupCall.incoming", updateRooms); + client.on("GroupCall.participants", updateRooms); return () => { client.removeListener("GroupCall.incoming", updateRooms); + client.removeListener("GroupCall.participants", updateRooms); }; }, []); diff --git a/src/Facepile.jsx b/src/Facepile.jsx new file mode 100644 index 00000000..f2c7d765 --- /dev/null +++ b/src/Facepile.jsx @@ -0,0 +1,24 @@ +import React from "react"; +import styles from "./Facepile.module.css"; +import ColorHash from "color-hash"; + +const colorHash = new ColorHash({ lightness: 0.3 }); + +export function Facepile({ participants }) { + console.log(participants); + return ( +