Stream Conferencing & Mixing

Hi Max, Due to a specific use case we are using Stream Conferencing > then Mixing all the participants > Republishing the combined stream to YouTube this much is working fine. Here we have a query -

1. to add multiple users to Mixer I am querying flashphoner API
Code:
 /stream/find_all
then filtering using Conference-Name available in custom field, then adding those stream to mixer, here my concern is can we pass conference name to get only those stream which are part of that specific conference ? some thing like that would be really helpful.
 

Max

Administrator
Staff member
Good day.
A room is not an object itself, so we cannot filter by its name directly. But every stream name in the room starts from room name. So you can use /stream/find query with filtering by name.
For example, we have the room named room-c28218 with 2 participants. Then, to get all the stream names in the room, let's find all the streams published on server and filter the result using jq selector with regexp
Code:
curl -s -H "Content-Type: application/json" -X POST http://localhost:8081/rest-api/stream/find -d '{"published":true}' | jq '.[] | select(.name|test("room-c28218.*")) | .name'
We get the following list of room streams:
Code:
"room-c28218-participant1-c9cb"
"room-c28218-participant2-d393"
 
Top