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.
Acesse a referência do componente, pegue o projeto demo pronto para executar e baixe a versão de avaliação.
| Ajuda online — Protocol_WebRTC Referência completa de propriedades, métodos e eventos deste componente. | Abrir | |
| Projeto demo — Demos\Protocols\WebRTC Exemplo pronto para executar. Acompanha o pacote sgcWebSockets — baixe a versão de avaliação abaixo. | Abrir | |
| Documento técnico (PDF) Recursos, início rápido, exemplos de código para Delphi & C++ Builder e referências de fontes primárias — somente deste componente. | Abrir | |
| Manual do usuário (PDF) Manual completo cobrindo todos os componentes da biblioteca. | Abrir |