Skip to main content

withSignals

function withSignals(peer): (signals) => Detach[];

Handle some core signals for the peer connection.

Parameters

ParameterTypeDescription
peerPeerConnectionThe peer connection

Returns

the signal subscriptions which are needed to be called when closing the peer connection

(signals): Detach[];

Map signals

Parameters

ParameterTypeDescription
signalsOmit<PCSignals, "onOfferRequired">The provided signals to map to the PC events

Returns

Detach[]