Factory returning a new werift RTCPeerConnection, suitable as the
createPeerConnection option to
import("@reticulum/core/src/webrtc/signaling.js").WebRTCSignaling.
The returned object is duck-compatible with the RTCPeerConnection shape the
core's WebRTC transport expects (createDataChannel, createOffer,
createAnswer, setLocalDescription, setRemoteDescription,
addIceCandidate, close, …), so it can be used wherever the browser global
would be.
Parameters
Optionalconfig: Partial<PeerConfig>
Optional werift configuration, e.g. { iceServers } for STUN/TURN.
Factory returning a new werift
RTCPeerConnection, suitable as thecreatePeerConnectionoption to import("@reticulum/core/src/webrtc/signaling.js").WebRTCSignaling.The returned object is duck-compatible with the
RTCPeerConnectionshape the core's WebRTC transport expects (createDataChannel,createOffer,createAnswer,setLocalDescription,setRemoteDescription,addIceCandidate,close, …), so it can be used wherever the browser global would be.