A lightweight WebRTC transport for peer-to-peer connections with Pipecat
SmallWebRTCTransport
enables peer-to-peer WebRTC connections between clients and your Pipecat application. It implements bidirectional audio and video streaming using WebRTC for real-time communication.
This transport is intended for lightweight implementations, particularly for local development and testing. It expects your Pipecat server to include the corresponding SmallWebRTCTransport
server-side implementation.
connect()
, the SmallWebRTCTransport
optionally takes a set of connection parameters. This can be provided directly or via a connection endpoint passed to the PipecatClient
’s connect method. If using an endpoint, your endpoint should return a JSON object matching the SmallWebRTCTransportConnectionOptions
type, which currently expects a single connectionUrl
property.
PipecatClient
and should be called from the PipecatClient
. However, there are a few transport-specific methods that you may need to call directly. When doing so, be sure to access your transport via the transport
property of the PipecatClient
instance.
PipecatClient
event handlers.