Create a signaling client.
The gateway URL.
The WebSocket implementation to use.
Called when the socket drops or the server reports an unsolicited error.
Called when a receiver joins the session.
Called when the peer leaves the session.
Called for every relayed signal payload from the peer.
Close the socket without notifying onClose.
Open the socket.
A promise that resolves once the socket is open.
Join an existing session as the receiver.
The session to join.
The session grant.
Leave the session and close the socket.
A thin typed client for the API's
/p2psignaling gateway.The
WebSocketconstructor is injected so this works in browsers and in Node without pulling in a runtime dependency.See
P2PClient.gatewayUrl