is this possible.... querrying janus_videocall_participants

168 views
Skip to first unread message

Pete Andrews

unread,
Jan 28, 2015, 2:29:39 PM1/28/15
to meetech...@googlegroups.com
forgive me if this is a dumb question....
but is it possible for a separate entity on the network (i.e. not the client in the session) to issue a GET to receive a list of all janus_videocall_participants that the videocall plugin currently has in it's session? is there one instance of the videocall plugin per janus server? or per client?

background:
i'd like to be able to have outside control over the bitrates of the clients using the janus server for calls. i was assuming i could get handles to the participants through the videocall plugin somehow and send set requests to them.

am i way off here?

thanks!

-pete

Lorenzo Miniero

unread,
Jan 29, 2015, 7:21:42 AM1/29/15
to meetech...@googlegroups.com
That's a good question, and something we thought of ourselves as well. As of now, you can only get a list of the available rooms through the API, but this doesn't contain a list of the participants as well. Adding a new method to just return the participants in a call would be quite trivial to do, so we'll add this for both the videoroom and audiobridge plugin in one of the next versions.

L.

Pete Andrews

unread,
Jan 29, 2015, 10:10:19 AM1/29/15
to meetech...@googlegroups.com
Nice.
I was going to do it myself here anyway.... unless it's something going in the base in the next few days ;-)

-pete

Lorenzo Miniero

unread,
Jan 29, 2015, 10:29:26 AM1/29/15
to meetech...@googlegroups.com
Already done, just testing, it will probably land on github tomorrow.

L.

Pete Andrews

unread,
Jan 29, 2015, 12:49:14 PM1/29/15
to meetech...@googlegroups.com
Fantastic!

-pete

Lorenzo Miniero

unread,
Jan 30, 2015, 6:15:34 AM1/30/15
to meetech...@googlegroups.com
Just pushed the change,

Lorenzo

Pete Andrews

unread,
Jan 30, 2015, 8:54:09 AM1/30/15
to meetech...@googlegroups.com
thanks so much Lorenzo - did you update the documentation for this new api?
can you post an example so i can test it?

thanks!!

pete

Lorenzo Miniero

unread,
Jan 30, 2015, 8:54:46 AM1/30/15
to Pete Andrews, meetech...@googlegroups.com
{request:"listparticipants",room:1234}

L.

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lorenzo Miniero

unread,
Jan 30, 2015, 8:55:58 AM1/30/15
to meetech...@googlegroups.com
{request:"listparticipants",room:1234}

L.

Pete Andrews

unread,
Jan 30, 2015, 9:25:20 AM1/30/15
to meetech...@googlegroups.com
Lorenzo -
so sorry - i'm a bit of a beginner here.... can you give me an example curl POST to send the server in order for this request to get to the janus.plugin.videocall ?

thanks!

pete

Lorenzo Miniero

unread,
Jan 30, 2015, 9:27:24 AM1/30/15
to meetech...@googlegroups.com
Messaging plugins is documented here: http://janus.conf.meetecho.com/docs/rest.html

L.

Wilbert Jackson

unread,
Feb 1, 2015, 8:57:33 AM2/1/15
to meetech...@googlegroups.com
Lorenzo,

We tried the listparticipants call and get the following error

 /janus/{"janus":"listparticipants","session_id":205073684,"room":"6666","transaction":"w61avc2xMsy1"}

listparticipants response data {
   "janus": "error",
   "session_id": 205073684,
   "transaction": "w61avc2xMsy1",
   "error": {
      "code": 453,
      "reason": "Unknown request 'listparticipants'"
   }
}

Thanks

Wilbert Jackson

Lorenzo Miniero

unread,
Feb 2, 2015, 4:33:18 AM2/2/15
to meetech...@googlegroups.com
You need the latest version of the code.

L.

Pete Andrews

unread,
Feb 2, 2015, 1:06:10 PM2/2/15
to meetech...@googlegroups.com
i just realilzed -  you implemented this API for the videoroom plugin.... so sorry.
i was originally asking about the videocall plugin... again... this may have been a bit of a misguided question...
but i was looking for a way to ask the server about all the peers in ALL calls... so for example, if we have a bunch of peers all in calls using a page based on the  the videocall pluging, is there an API to query the server for all participants in all calls?

-pete

Lorenzo Miniero

unread,
Feb 2, 2015, 2:28:33 PM2/2/15
to meetech...@googlegroups.com
That's a different feature, and that needs to be implemented carefully, mostly because of privacy reasons (you don't want me to know who you're in call with). I'll have to think about a safe way to handle this. Feel free to open an issue on github for this request to be considered.

L.

Pete Andrews

unread,
Feb 2, 2015, 3:03:44 PM2/2/15
to meetech...@googlegroups.com
yes - understood. I may be able to do what i want using the videoroom plugin instead... so in the meantime i'll try to implement something using that.

thanks!

-pete

Pete Andrews

unread,
Feb 3, 2015, 9:19:55 AM2/3/15
to meetech...@googlegroups.com
Lorenzo -
the more i think about it - the more it makes sense (at least for what we are trying to accomplish on my research project) for us to be able to have an API (admin type thing?) where i can ask the server (not the videocall plugin) for a list of all participants in all videocalls, and then be able to force changes to their bitrates.
It may not need to be a feature included in the base, but something we implement for ourselves. I guess i'm looking for a little direction or a starting point if i go that direction.

thanks so much for all your attention to this!

pete

Lorenzo Miniero

unread,
Feb 3, 2015, 9:38:29 AM2/3/15
to meetech...@googlegroups.com
The core knows nothing about what plugins do with the media, and so "videocall" has no sense as far as it is concerned. Different plugins do different things entirely, and the way the describe their internals is entirely up to them.

That said, what you want is probably already possible through the admin API, but not in a single call. More specifically, using the admin API you can get handle-specific information that contains plugin details (in the case of the videocall, the username and who the user is in call with, for instance). So, if you want a view of all the videocals, just iterate through all the sessions and handles and just grab the info from those attached to the videocall plugin.

Some brief info on the admin API is available here: http://janus.conf.meetecho.com/docs/admin.html
Then just play with the existing admin.html demo page (after you enable the admin features in the configuration) to check how you can craft something that does what you want.

L.

Pete Andrews

unread,
Feb 3, 2015, 11:01:52 AM2/3/15
to meetech...@googlegroups.com
Ok - yes... using the admin interface i can see how to do this...
get a list of sessions, from there get handles from the sessions, then the handle_info... down in there i can see the bitrates.
from there i can just use the REST API to get at the bitrates to issue changes... correct?

thanks again!

-pete

Lorenzo Miniero

unread,
Feb 3, 2015, 11:43:16 AM2/3/15
to meetech...@googlegroups.com
Yep, that should work.

L.

Pete Andrews

unread,
Feb 3, 2015, 1:06:45 PM2/3/15
to meetech...@googlegroups.com
boom.
thanks!

-pete
Reply all
Reply to author
Forward
0 new messages