CreatePeerConnectionCallbacks

PeerConnection.PeerConnectionHelpers. CreatePeerConnectionCallbacks

Callbacks for createPeerConnection method

Source:

Methods

(static) ondatachannel(peerConnection, targetMid, currentRoomState, event)

Parameters:
Name Type Description
peerConnection RTCPeerConnection
targetMid String
currentRoomState SkylinkState
event Event
Source:

(static) onicecandidate(peerConnection, targetMid, roomState, rtcIceConnectionEvent)

Parameters:
Name Type Description
peerConnection RTCPeerConnection
targetMid String
roomState SkylinkState

The current state.

rtcIceConnectionEvent Event
Source:

(static) oniceconnectionstatechange(peerConnection, targetMid, currentRoomState)

Parameters:
Name Type Description
peerConnection RTCPeerConnection
targetMid String

The Peer Id

currentRoomState SkylinkState
Source:
Fires:
  • event:iceConnectionState

(static) onicegatheringstatechange(peerConnection, targetMid, roomState)

Parameters:
Name Type Description
peerConnection RTCPeerConnection
targetMid String

The Peer Id

roomState SkylinkState

The current state

Source:
Fires:
  • event:candidateGenerationState

(static) onremovetrack(peerId, room, isScreensharing, rtcTrackEvent)

Parameters:
Name Type Description
peerId String
room String
isScreensharing boolean
rtcTrackEvent MediaStreamTrackEvent
Source:
Fires:
  • event:streamEnded

(static) onsignalingstatechange(peerConnection, targetMid, roomState)

Parameters:
Name Type Description
peerConnection RTCPeerConnection
targetMid String

The Peer Id

roomState SkylinkState

The current state.

Source:
Fires:
  • event:peerConnectionState

(static) ontrack(RTCPeerConnection, targetMid, currentRoomState, rtcTrackEvent) → {null}

Function that handles the RTCPeerConnection.addTrack remote MediaTrack received.

Parameters:
Name Type Description
RTCPeerConnection RTCPeerConnection
targetMid String
currentRoomState SkylinkState
rtcTrackEvent RTCTrackEvent
Source: