Web SDK - RTCTransport\_2.(constructor)

Home > rainway-sdk > RTCTransport_2 > (constructor)

RTCTransport_2.(constructor)

Constructs a new instance of the RTCTransport class

Signature:

constructor(ownPeerId: PeerId, targetPeerId: PeerId, sendLocalOfferSdp: (localOfferSdp: string) => void, sendLocalAnswerSdp: (localAnswerSdp: string) => void, sendLocalIceCandidate: (localIceCandidate: RTCIceCandidate) => void, reportStateChange: (state: RainwayPeerState) => void);

Parameters

ParameterTypeDescription
ownPeerIdPeerId
targetPeerIdPeerId
sendLocalOfferSdp(localOfferSdp: string) => void
sendLocalAnswerSdp(localAnswerSdp: string) => void
sendLocalIceCandidate(localIceCandidate: RTCIceCandidate) => void
reportStateChange(state: RainwayPeerState) => void