Table of Contents

TTMSFNCWXWebRTCPeer Class

Represents a single peer connection, identified by a name, and drives offer/answer negotiation, ICE candidate exchange, and data channel messaging with one remote peer.

API unit family: TMSFNCWXWebRTC Inherits from: TCollectionItem

Syntax

TTMSFNCWXWebRTCPeer = class(TCollectionItem)

Properties

Name Description
BundlePolicy Controls how media tracks are grouped onto transports for this connection. Defaults to wbpBalanced.
DataChannels The data channels configured for this connection.
IceServers The STUN and TURN servers this connection uses to establish connectivity.
IceTransportPolicy Controls which ICE candidate types this connection may use. Defaults to witpAll.
PeerID The identifier that distinguishes this peer connection from others and is used to route signaling, candidates, and messages.

Methods

Name Description
AcceptAnswer Applies a remote answer received from the other peer to complete negotiation.
AcceptOffer Applies a remote offer received from the other peer and prepares a local answer.
AddDataChannel Creates a data channel with the given name on this connection and returns its configuration entry.
AddIceCandidate Adds an ICE candidate received from the remote peer to this connection.
CreateOffer Starts negotiation by creating a local offer for this peer. The generated offer is reported through the owning component's offer event.
RestartIce Restarts ICE gathering to recover connectivity after a network change or connection failure.
SendData Sends a text message over the named data channel.