sgcWebRTC Calls and data, peer to peer. No browser inside.

sgcWebRTC is the WebRTC media engine for Delphi and C++ Builder. Add real-time audio and video calls, screen sharing and SCTP data channels to your applications, encrypted with DTLS-SRTP and interoperable with the RTCPeerConnection in any browser. It is compiled Object Pascal calling the operating system's own media APIs, with no WebView and no JavaScript bridge in your process.

  • Delphi
  • C++ Builder
  • Windows, Linux, macOS
  • iOS & Android
  • STUN / TURN / ICE
  • No WebView required
YOUR SIGNALING CHANNEL WebSocket, HTTP, anything SDP offer SDP answer + trickle ICE candidates Delphi app TsgcRTCPeerConnection audio · Opus video · H.264 data channel 'chat' no WebView in the process Browser or Delphi RTCPeerConnection OnAudio OnVideoFrame OnMessage JSEP, RFC 8829 DTLS-SRTP RTP media + SCTP data STUN public address TURN relay when blocked ICE Signaling goes through your server. The media goes straight between the peers.
  • 1Component for the whole peer connection
  • 5Platforms: Windows, Linux, macOS, iOS and Android
  • 5Codecs: Opus, G.711, VP8, H.264 and Motion JPEG
  • 100%Of RTP, RTCP and SCTP packets encrypted
  • 0Browsers or WebViews in your process
Watch it work

See sgcWebRTC in two minutes.

Peer-to-peer media and data channels from Delphi: STUN, TURN, ICE and RTCPeerConnection, browser to native. Narrated, with captions. Nothing downloads until you press play.

One component

The whole peer connection on one object.

sgcWebRTC does not add new palette components. It unlocks the rest of the W3C-shaped surface on the same TsgcRTCPeerConnection that ships in sgcWebSockets Enterprise: signaling, connectivity, encryption, data channels and media.

Browser-compatible signaling

CreateOffer, CreateAnswer, SetLocalDescription, SetRemoteDescription and AddIceCandidate build and consume real SDP. Renegotiation, ICE restart and the W3C perfect-negotiation glare rule are built in.

View the component →

STUN, TURN and ICE

Trickle or non-trickle ICE gathering against RTCOptions.ICEServers, with server-reflexive candidates from STUN and relayed candidates from TURN when a direct path is blocked.

DTLS-SRTP encryption

A DTLS handshake over the nominated ICE pair derives the SRTP keys, and every RTP, RTCP and SCTP packet is encrypted from the first packet. It cannot be turned off for media, the same model a browser enforces.

Audio and video tracks

AddTrack attaches an Opus or G.711 audio track, or a VP8, H.264 or Motion JPEG video track. H.264 uses the platform's hardware encoder: Media Foundation, VideoToolbox or MediaCodec.

Codec and platform matrix →

SCTP data channels

CreateDataChannel opens an ordered or unordered, reliable or partially reliable channel (RFC 8831/8832). Send, SendBytes, OnMessage and OnMessageBinary move text and binary payloads.

Adaptive bitrate

A delay-based estimator in the style of Google Congestion Control drives the video encoder's target bitrate, backed by RTCP NACK and PLI, RFC 4588 RTX and RED/ULPFEC.

QuickStart

An offer, and a data channel.

Set an ICE server, hook the SDP and ICE events, open a data channel, then create the offer. The same API in Delphi and C++ Builder.

uses
  sgcP2P;
var
  oRTC: TsgcRTCPeerConnection;
begin
  oRTC := TsgcRTCPeerConnection.Create(nil);
  oRTC.RTCOptions.ICEServers.AddURL('stun:stun.l.google.com:19302');
  oRTC.OnLocalDescription := OnLocalDescriptionHandler;
  oRTC.OnICECandidate := OnICECandidateHandler;
  oRTC.OnConnectionStateChange := OnConnectionStateChangeHandler;
  oRTC.OnDataChannel := OnDataChannelHandler;
  oRTC.CreateDataChannel('chat'); // forces RTCOptions.DTLS on
  oRTC.CreateOffer; // gathers ICE candidates, builds the SDP offer
end;

procedure TForm1.OnLocalDescriptionHandler(Sender: TObject;
  const aType, aSDP: string);
begin
  // send aType + aSDP to the remote peer over your own signaling channel
end;

procedure TForm1.OnDataChannelHandler(Sender: TObject;
  aChannel: TsgcRTCDataChannel);
begin
  aChannel.OnMessage := OnChannelMessageHandler;
  aChannel.Send('hello');
end;
// includes: sgcP2P.hpp
TsgcRTCPeerConnection *oRTC = new TsgcRTCPeerConnection(NULL);
oRTC->RTCOptions->ICEServers->AddURL("stun:stun.l.google.com:19302");
oRTC->OnLocalDescription = OnLocalDescriptionHandler;
oRTC->OnICECandidate = OnICECandidateHandler;
oRTC->OnConnectionStateChange = OnConnectionStateChangeHandler;
oRTC->OnDataChannel = OnDataChannelHandler;
oRTC->CreateDataChannel("chat"); // forces RTCOptions->DTLS on
oRTC->CreateOffer(); // gathers ICE candidates, builds the SDP offer

void __fastcall TForm1::OnLocalDescriptionHandler(TObject *Sender,
  const String aType, const String aSDP)
{
  // send aType + aSDP to the remote peer over your own signaling channel
}

void __fastcall TForm1::OnDataChannelHandler(TObject *Sender,
  TsgcRTCDataChannel *aChannel)
{
  aChannel->OnMessage = OnChannelMessageHandler;
  aChannel->Send("hello");
}
  1. Point it at a STUN or TURN serverAdd the ICE servers to RTCOptions.ICEServers. Candidates are gathered against them, trickled or all at once.
  2. Carry the SDP over your own channelOnLocalDescription hands you the offer or answer, OnICECandidate each candidate. Send them through any signaling server, exactly as a browser application does.
  3. Talk peer to peerOnce the DTLS handshake completes, data channels open and audio and video tracks flow straight between the peers, encrypted.

That is one side of the exchange. The other side, the signaling relay and the media tracks on top are in the task guide.

Two Delphi apps, peer to peer

Where it fits

WebRTC without embedding a browser.

Other approaches to WebRTC in Delphi embed a full browser engine and drive its JavaScript stack from Pascal. sgcWebRTC calls the operating system's media APIs directly, which keeps the binary small and lets the same component run where no browser is installed at all.

Delphi app to browser

Standard SDP and the JSEP state machine (RFC 8829) mean a native Delphi or C++ Builder client can call the RTCPeerConnection in a web page, and the other way round.

Delphi app to Delphi app

Two native applications exchange audio, video and data channels directly, with only the signaling passing through your server.

Read the task guide →

Mobile, headless and kiosk

No embedded Chromium binary means the same component runs on Android and iOS, and in headless services or kiosk devices with no browser installed.

Screen sharing and remote support

Capture the desktop, a monitor, a window or a region on Windows, cursor included, and stream it as a video track with a data channel alongside.

Voice and video calls

Native camera and microphone capture backends on Windows, Linux, Apple platforms and Android feed the tracks directly, and renderer backends show the remote video.

Use data channels on their own for chat, telemetry, file transfer or game state, with the reliability and ordering chosen per channel.

Licensing

An add-on to sgcWebSockets Enterprise.

sgcWebRTC unlocks the media engine on the TsgcRTCPeerConnection that sgcWebSockets Enterprise already ships with ICE and TURN connectivity. It is not available for Standard or Professional. Every license includes full source code and one year of updates.

sgcWebSockets Enterprise

The base it builds on: STUN, TURN and ICE clients, the base TsgcRTCPeerConnection, plus WebSocket, HTTP/2, MQTT and the rest of the library.

€699 / developer

sgcWebRTC

SDP signaling, DTLS-SRTP, SCTP data channels, audio and video tracks, screen capture and bandwidth estimation. Single, Team and Site licenses.

€299 / developer

All-Access bundle

Every eSeGeCe product for one year, Delphi and .NET, sgcWebSockets Enterprise and sgcWebRTC included, with Premium Support.

€1,059 / developer

The trial installer is per IDE version and already contains the WebRTC components, so there is no separate download.

See sgcWebRTC pricing

Put a real peer connection behind your Delphi app.

Audio, video and data channels, encrypted end to end, from the language you already use.

Latest from the blog

View all posts →

You are seeing the sgcWebRTC view of eSeGeCe.

Show me another angle →
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy