Get information about all participants for a conference/room

Hey guys,

I figured out that it’s possible to get the the count of participants but I need a list with all information about all participants in a conference/room in real time. I think it possible to get those directly from prosody. Another important thing is that I need them without being joined in a conference/room but it’s enough when another backend service is able to fetch the information in real time.

I hope someone can help out? :sweat_smile:

I need the information which are shown in the jitsi-meet UI.

For example:

  • User Name
  • User ID
  • Audio Muted
  • Currently Talking

Maybe important: I’m using JWT tokens for authentication.

1 Like

U got to write a prosody plug-in for that check out this module u will get some idea

1 Like

Thank you for your reply.
I’m developing a module right now and I’m already able to get the list of users for all rooms but my problem is that I can not find any event in prosody to update the values when a user joins or leaves a room. I found muc-occupant-joined and muc-occupant-left but they are not triggered when I join or leave a room.

Is there any possibility to do that?

See this post: Participant Count in Jitsi room

-> Check the version of prosody
-> The module should be loaded with the muc host

Okay thank you again.

I added the module to the MUC component and the events were fired. Then I had the problem that I don’t have access to the http endpoint I’ve opened in my module to provide the information in real time.
I had to convert It into a Shared Module to also add it to the right VirtualHost.

Now I can listen to the event on my own server and also in the javascript frontend which person joined and left which room.
I will request the other data like user name and audio information in the frontend via lib-jitsi-meet after the client joined the channel.

I hope this information will be helpful for some other devs.

I got my inspiration how to send the information in real time from the following module.
https://hg.prosody.im/prosody-modules/file/1908e7aefca9/mod_http_stats_stream/mod_http_stats_stream.lua

@sapkra Possible to share this code? Thank you in advance.

Sorry but I can’t share the code yet because it’s part of one of our core features and the codebase is not opensource yet.
But basically I used mod_http_stats_stream.lua and modified it to use the muc-occupant-joined and muc-occupant-left events.

1 Like

Hi, your answer to this topic was a while ago. are you able to share your solution as I need this as well? thanks

1 Like

I’m probably misunderstanding, but isn’t there a room.getParticipants() method?

Maybe but currently we want to get the event when someone joined or left a room.

Hi, I am in confusion about how to use this room.getParticipants() method? Can I use it in the IFRAME API? if so, how?

Iv’e not used the iframe API, so I don’t know, but my guess would be no. There might be another way to accomplish the same thing though. You’d just have to check the documentation and experiment a bit.