Web SDK - RainwayConfig.onPeerStateChange

Home > rainway-sdk > RainwayConfig > onPeerStateChange

RainwayConfig.onPeerStateChange property

Called when a new peer-to-peer connection is initiated (state == New) or when its connectivity state changes (see RainwayPeerState values).

Signature:

onPeerStateChange: (runtime: RainwayRuntime, peer: RainwayPeer, state: RainwayPeerState) => void;