Call participant count returns incorrect count

I am using the CometChat 2.3.2 SDK. I am trying to get the call participant count for a direct call that I started using a chat group id. When I called CometChat.getCallParticipantCount() it returned 0 and I saw that the api call the SDK does returned a 404 error.

The api call it does looks like this:
https://xmpp.rtc-eu.cometchat.io/room-size?domain=rtc-eu.cometchat.io&room=842c2ff7-f200-42a7-84c7-89c5f698f22a-422a5b96-9db5-4079-87cc-882f4b0fc692

I did the call when I was alone in a direct call, but I would expect that it would return 1 and not 0 with a 404 error.

Hello @Hendrik-Jan,

Can you please share the code snippet of CometChat.getCallParticipantCount() , and also can you please let us know when do you call the above method? Just after the call connects or after some time?

Warm Regards,

CometChat Pro
Mayur Bhandari

The code snippet boils down to something that looks like this:

CometChat.getCallParticipantCount( '842c2ff7-f200-42a7-84c7-89c5f698f22a-422a5b96-9db5-4079-87cc-882f4b0fc692', CometChat.CALL_TYPE.VIDEO ).then((count) => {console.log(count)})

The id is the session id I passed in the call settings of the CometChat.startCall

It always returns 0 even if I wait like 5 minutes.

Hello @Hendrik-Jan,

The second argument of the method has to be direct instead of video. You can read more about this method here.

Warm Regards,

CometChat Pro
Mayur Bhandari

1 Like

That worked. Thanks a lot for the help.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.