This example shows how to setup an FCSDK browser call between two participants (consumers / users), with a third participant (monitor) able to listen to and view media from both the original participants. The two parties are also able to chat, which is monitored and receive private messages from the monitor.
Note: N-way calling is not supported on iOS or Android Clients.
The source code consists of two main pieces (consumer, monitor). Each part has two main components - a server side session provisioning script (session.php) and a client-side piece (index.html).
If you haven't already, we'd recommend you go through the minimal sample app article here, to setup and get a feel for your server and client-side app components.
Any consumer can "join" by declaring their username, which dynamically registers them for a session under that username. An "online" AED topic is updated on join, notifying previously joined parties that a new user has joined (including the monitor).
"Online" parties are able to call other "online" parties by clicking the username link in the "online" list. This sets up an auto-answered voice and video call, in both directions. Once the call is established the monitor is notified by a clickable element being added to their "calls" list (another AED topic).
When the monitor clicks a call in the list, it causes the two consumer parties to both make a voice and video call into the monitor. These calls are automatically answered, but no media is sent back to either calling consumer.
Both consumers are notified of the monitor's presence on the call by an 'alert' element at the top of the page.
In addition to the V&V calls, users are able to send each other text messages once they are in a call. The monitor also sees chat messages between the two consumers. Once the monitor is listening tho their voice and video streams, they may also send chat messages privately to each user on the original call.
Example repository - https://bitbucket.org/cafexsup/call-monitoring
Please sign in to leave a comment.