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.

TsgcWSPServer_WebRTC

Server-side WebRTC signalling channel. Bind on top of a TsgcWebSocketHTTPServer, declare ICE servers, broadcast SDP / ICE candidates between peers.

Classe do componente

TsgcWSPServer_WebRTC

Protocolo

WebRTC signalling channel

Plataformas

Windows, macOS, Linux, iOS, Android

Edição

Enterprise

Drop the component, set a few properties, go

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;

O que tem por dentro

5 published properties, 2 methods, 11 events — pulled from the component reference.

Messaging

Methods: Broadcast, WriteData.

Lifecycle

Events: OnConnect, OnDisconnect, OnError.

Configuration

Published properties: WebRTC.

Diagnostics

Published properties: Guid, Version.

Server

Properties: Server, Broker.

PubSub

Events: OnBeforeSubscription, OnSubscription, OnUnSubscription.

Especificações & referências

Authoritative sources for the protocols this component implements.

Documentação & Demos

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.
Projeto demo — Demos\Protocols\WebRTC Exemplo pronto para executar. Acompanha o pacote sgcWebSockets — baixe a versão de avaliação abaixo.
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.
Manual do usuário (PDF) Manual completo cobrindo todos os componentes da biblioteca.

Ready to Get Started with WebRTC?

Download the free trial and start building peer-to-peer communication in minutes.