Get Live Participants

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.

NameTypeDescription
peerIdstringThe peer id of the user
joinTimenumberTime of joining the call in Epochs
exitTImenumber | undefinedTime of exiting the call in Epochs
metadataunknownMetadata associated with the peer
{
  "participants": [
    {
      "peerId": "peerId--AmxuhmUBW17kP1FGL2mU",
      "joinTime": 1706810039986,
      "exitTime": 1706811249372,
      "metadata": {
          ...
      }
    },
    ...
  ]
}
Audio/Video Infrastructure designed for developers to empower them to ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.