title: 'getLiveParticipantsDetails()'
Get Participants Detail
This method returns a list of participants in a live meetings. By passing the roomId
, you can
easily access a list of participants who are currently attending the meeting.
💡
You can retrieve the roomId
by using getRooms()
.
Example
import { API } from '@huddle01/server-sdk/api';
const liveParticipantsList = async () => {
const api = new API({
apiKey: process.env.API_KEY!,
});
const participantsRes = await api.getLiveParticipantsDetails({
roomId: 'YOUR_ROOM_ID',
});
return participantsRes;
};
Returns
getParticipants()
returns following details.
Name | Type | Description |
---|---|---|
peerId | string | The peer id of the user |
joinTime | number | Time of joining the call in Epochs |
exitTIme | number | undefined | Time of exiting the call in Epochs |
metadata | unknown | Metadata associated with the peer |
{
"participants": [
{
"peerId": "peerId--AmxuhmUBW17kP1FGL2mU",
"joinTime": 1706810039986,
"exitTime": 1706811249372,
"metadata": {
...
}
},
...
]
}