Callbacks for createPeerConnection method
Methods
(static) ondatachannel(peerConnection, targetMid, currentRoomState, event)
Parameters:
Name | Type | Description |
---|---|---|
peerConnection |
RTCPeerConnection | |
targetMid |
String | |
currentRoomState |
SkylinkState | |
event |
Event |
(static) onicecandidate(peerConnection, targetMid, roomState, rtcIceConnectionEvent)
Parameters:
Name | Type | Description |
---|---|---|
peerConnection |
RTCPeerConnection | |
targetMid |
String | |
roomState |
SkylinkState |
The current state. |
rtcIceConnectionEvent |
Event |
(static) oniceconnectionstatechange(peerConnection, targetMid, currentRoomState)
Parameters:
Name | Type | Description |
---|---|---|
peerConnection |
RTCPeerConnection | |
targetMid |
String |
The Peer Id |
currentRoomState |
SkylinkState |
Fires:
- event:iceConnectionState
(static) onicegatheringstatechange(peerConnection, targetMid, roomState)
Parameters:
Name | Type | Description |
---|---|---|
peerConnection |
RTCPeerConnection | |
targetMid |
String |
The Peer Id |
roomState |
SkylinkState |
The current state |
Fires:
- event:candidateGenerationState
(static) onremovetrack(peerId, room, isScreensharing, rtcTrackEvent)
Parameters:
Name | Type | Description |
---|---|---|
peerId |
String | |
room |
String | |
isScreensharing |
boolean | |
rtcTrackEvent |
MediaStreamTrackEvent |
Fires:
- event:streamEnded
(static) onsignalingstatechange(peerConnection, targetMid, roomState)
Parameters:
Name | Type | Description |
---|---|---|
peerConnection |
RTCPeerConnection | |
targetMid |
String |
The Peer Id |
roomState |
SkylinkState |
The current state. |
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 |