Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.22 KB

sip.js.sessiondescriptionhandler.peerconnectiondelegate.md

File metadata and controls

38 lines (26 loc) · 1.22 KB

Home > sip.js > SessionDescriptionHandler > peerConnectionDelegate

SessionDescriptionHandler.peerConnectionDelegate property

A delegate which provides access to the peer connection event handlers.

Signature:

get peerConnectionDelegate(): PeerConnectionDelegate | undefined;

set peerConnectionDelegate(delegate: PeerConnectionDelegate | undefined);

Remarks

Use the peerConnectionDelegate to get access to the events associated with the RTCPeerConnection. For example...

Do NOT do this...

peerConnection.onicecandidate = (event) => {
  // do something
};

Instead, do this...

peerConnection.peerConnectionDelegate = {
  onicecandidate: (event) => {
    // do something
  }
};

Setting the peer connection event handlers directly is not supported and may break this class. As this class depends on exclusive access to them. This delegate is intended to provide access to the RTCPeerConnection events in a fashion which is supported.