Node.js SDK - PeerEvents

Home > @rainway/native > PeerEvents

PeerEvents interface

Events emitted by Peer

Signature:

export interface PeerEvents 

Properties

PropertyTypeDescription
"connection-state-change"(ev: PeerStateChangeEvent) => EventReturnTypeRaised when the peer's connection state has changed.
"stream-request"(ev: StreamRequestEvent) => EventReturnTypeRaised when the remote peer announces a stream.
close(ev: CloseEvent) => EventReturnTypeRaised when the connection to Rainway has been closed.
datachannel(ev: DataChannelEvent) => EventReturnTypeRaised when the remote peer creates a data channel.