This demo shows how build a Video Conference Server using TsgcWebSocketHTTPServer and WebRTC as javascript library.
The demo uses WebSocket protocol to signal WebRTC and uses public STUN/TURN servers, for production sites, you need to use your own STUN/TURN servers. Registered users can download Coturn for windows, which is already compiled and with all the required libraries to run in your servers.
The client must be a web browser with support for WebRTC connections.
WSServer.Port := StrToInt(txtDefaultPort.Text);
// ... bindings
With WSServer.Bindings.Add do
begin
Port := StrToInt(txtDefaultPort.Text);
IP := txtHost.Text;
end;
// ... active
WSServer.Active := True;
The demo requires an index HTML page which is used to dispatch the WebRTC front page, this page is provided with the demo.
Once configured the server, start it and select one of the web-browsers available. It will open a new Web-Browser session asking to start a new session. If successful you will see your video and if you open the same url in another web-browser, you will see both peers connected.
The demo runs by default without SSL, this is only valid for localhost connections. For production sites, use SSL connections. Check Server Chat Demo to configure SSL in server side.