Queuing incoming video calls

16 views
Skip to first unread message

Shrikant Giridhar

unread,
May 27, 2017, 12:47:29 AM5/27/17
to EasyRTC

I'm trying to write a one-on-one video chat application to help me hold office hours for remote students using WebRTC. Unlike the multiparty chat demo on the website, I'm trying to have multiple students call and get added to a queue waiting for their call to get answered, while a single call gets serviced by the client on the instructor's machine. I was hoping EasyRTC rooms would work for this but I'm not sure how to use the Rooms API to form a queuing system. I expect modest traffic (~300 students around the world) and 8 instructors (i.e. rooms). Is this application possible within EasyRTC?

Eric Davies

unread,
May 29, 2017, 1:12:02 AM5/29/17
to EasyRTC
This is pretty simple to do with easyrtc. How I'd set it up:
 You have two different pages, one for instructors, one for students.

 The page for students joins a particular instructors room - either disable the "join default room by default" on the server, or call easyrtc.joinRoom(specific_instructors_room) before connecting to the server because you want to avoid having everybody being in the same room. This will make the server work much better when you get into production. 

The page for instructors - same magic about not joining the default room, and:
   when your roomOccupantListener gets called with a list of room occupants, look for the occupant with the earliest (smallest) roomJoinTime field and cache it it's eayrtcid for when you want to call the next person in line.

If you need any of this further spelt out, let me know, it would be trivial to provide some example code.

Reply all
Reply to author
Forward
0 new messages