WebRTC
Peer-to-peer real-time communication for audio, video, and data. Build video conferencing, voice calls, and low-latency data channels directly in your Delphi applications.
Peer-to-peer real-time communication for audio, video, and data. Build video conferencing, voice calls, and low-latency data channels directly in your Delphi applications.
Server-side WebRTC signalling channel. Bind on top of a TsgcWebSocketHTTPServer, declare ICE servers, broadcast SDP / ICE candidates between peers.
TsgcWSPServer_WebRTC
WebRTC signalling channel
Windows, macOS, Linux, iOS, Android
Enterprise
Attach TsgcWSPServer_WebRTC to a TsgcWebSocketHTTPServer, push ICE servers, broadcast SDP / ICE candidates to channel subscribers.
uses
sgcWebSocket, sgcWebSocket_Server, sgcWebSocket_Protocol_WebRTC_Server;
var
WSServer: TsgcWebSocketHTTPServer;
WebRTC: TsgcWSPServer_WebRTC;
begin
WSServer := TsgcWebSocketHTTPServer.Create(nil);
WSServer.Port := 443;
WSServer.SSL := True;
WebRTC := TsgcWSPServer_WebRTC.Create(nil);
WebRTC.Server := WSServer;
// STUN/TURN ICE servers pushed to every joining peer
WebRTC.WebRTC.IceServers.Add('stun:stun.l.google.com:19302');
WebRTC.OnSubscription := DoJoin;
WebRTC.OnUnSubscription := DoLeave;
WSServer.Active := True;
// Broadcast a JSON signalling payload to every peer in a channel
WebRTC.Broadcast('{"type":"offer","sdp":"..."}', 'room-42');
end;
5 published properties, 2 methods, 11 events — pulled from the component reference.
Methods: Broadcast, WriteData.
Events: OnConnect, OnDisconnect, OnError.
Published properties: WebRTC.
Published properties: Guid, Version.
Properties: Server, Broker.
Events: OnBeforeSubscription, OnSubscription, OnUnSubscription.
Authoritative sources for the protocols this component implements.
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.
| Online Help — Protocol_WebRTC Full property, method and event reference for this component. | Open | |
| Demo Project — Demos\Protocols\WebRTC Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below. | Open | |
| Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only. | Open | |
| User Manual (PDF) Comprehensive manual covering every component in the library. | Open |