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.

Klasa komponentu

TsgcWSPServer_WebRTC

Protokół

WebRTC signalling channel

Platformy

Windows, macOS, Linux, iOS, Android

Edycja

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;

Co jest w środku

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.

Diagnostyka

Published properties: Guid, Version.

Server

Properties: Server, Broker.

PubSub

Events: OnBeforeSubscription, OnSubscription, OnUnSubscription.

Specyfikacje i odniesienia

Authoritative sources for the protocols this component implements.

Dokumentacja i dema

Przejdź bezpośrednio do dokumentacji komponentu, pobierz gotowy do uruchomienia projekt demonstracyjny i pobierz wersję próbną.

Pomoc online — Protocol_WebRTC Pełna dokumentacja właściwości, metod i zdarzeń tego komponentu.
Projekt demonstracyjny — Demos\Protocols\WebRTC Gotowy do uruchomienia projekt przykładowy. Dostarczany w pakiecie sgcWebSockets — pobierz wersję próbną poniżej.
Dokument techniczny (PDF) Funkcje, szybki start, przykłady kodu dla Delphi i C++ Builder oraz odniesienia do źródeł — tylko ten komponent.
Podręcznik użytkownika (PDF) Kompleksowy podręcznik obejmujący każdy komponent biblioteki.

Ready to Get Started with WebRTC?

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