All helper and utility functions for PeerConnection
class are listed here.
- Source:
-
Namespaces
-
CreateDataChannelCallbacks
-
-
CreatePeerConnectionCallbacks
-
Methods
(static) addPeer(params)
Function that starts the Peer connection session.
Parameters:
Name |
Type |
Description |
params |
object
|
options required to create a PeerConnection
Properties
Name |
Type |
Description |
currentRoom |
SkylinkRoom
|
The currrent room
|
targetMid |
String
|
Peer's id
|
peerBrowser |
Object
|
Peer's user agent object
|
cert |
RTCCertificate
|
Represents a certificate that an RTCPeerConnection uses to authenticate.
|
receiveOnly |
boolean
|
|
hasScreenshare |
boolean
|
Is screenshare enabled
|
|
- Source:
-
(static) closeDataChannel(roomState, peerId, channelPropopt)
Function that closes the datachannel.
Parameters:
Name |
Type |
Attributes |
Default |
Description |
roomState |
SkylinkState
|
|
|
|
peerId |
String
|
|
|
The Peer Id.
|
channelProp |
String
|
<optional>
|
main
|
The channel property.
|
- Source:
-
Fires:
-
event:onDataChannelStateChanged
(static) createAnswer(roomState, targetMid) → {*}
Parameters:
Name |
Type |
Description |
roomState |
SkylinkState
|
|
targetMid |
String
|
|
- Source:
-
Fires:
(static) createDataChannel(params) → {null}
Parameters:
Name |
Type |
Description |
params |
|
|
- Source:
-
Fires:
-
event:onDataChannelStateChanged
(static) createOffer(currentRoom, targetMid, iceRestart, restartOfferMsg) → {*}
Parameters:
Name |
Type |
Default |
Description |
currentRoom |
SkylinkRoom
|
|
|
targetMid |
String
|
|
|
iceRestart |
Boolean
|
false
|
|
restartOfferMsg |
object
|
|
|
- Source:
-
Fires:
(static) createPeerConnection(params) → {RTCPeerConnection}
Function that creates the Peer Connection.
Parameters:
Name |
Type |
Description |
params |
JSON
|
|
- Source:
-
Fires:
(static) getDataChannelBuffer(channel) → {Object}
Get RTCDataChannel buffer thresholds
Parameters:
Name |
Type |
Description |
channel |
RTCDataChannel.channel
|
|
- Source:
-
(private, static) getPeersInRoom(roomName) → {Object|null}
Parameters:
Name |
Type |
Description |
roomName |
String
|
|
- Source:
-
(static) refreshPeerConnection(listOfPeers, roomState, doIceRestartopt, bwOptionsopt) → {Promise}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
listOfPeers |
String.<Array>
|
|
|
|
roomState |
SkylinkState
|
|
|
|
doIceRestart |
boolean
|
<optional>
|
false
|
|
bwOptions |
Object
|
<optional>
|
{}
|
Properties
Name |
Type |
Description |
bandwidth |
JSON
|
|
googleXBandwidth |
JSON
|
|
|
- Source:
-
(static) restartMCUConnection(roomState, doIceRestartopt, bwOptionsopt) → {Promise}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
roomState |
SkylinkState
|
|
|
|
doIceRestart |
boolean
|
<optional>
|
false
|
|
bwOptions |
Object
|
<optional>
|
{}
|
Properties
Name |
Type |
Description |
bandwidth |
JSON
|
|
googleXBandwidth |
JSON
|
|
|
- Source:
-
(static) restartPeerConnection(peerId, roomState, options) → {Promise}
Function that sends restart message to the signaling server.
Parameters:
Name |
Type |
Description |
peerId |
String
|
|
roomState |
SkylinkState
|
|
options |
Object
|
Properties
Name |
Type |
Description |
bandwidth |
Object
|
|
googleXBandwidth |
Object
|
|
|
- Source:
-
(static) sendP2PMessageForRoom(message, targetPeerId, roomState) → {null}
Parameters:
Name |
Type |
Description |
message |
|
|
targetPeerId |
String
|
|
roomState |
SkylinkState
|
|
- Source:
-
Fires:
(static) signalingEndOfCandidates(targetMid, roomState) → {null}
Parameters:
Name |
Type |
Description |
targetMid |
String
|
|
roomState |
SkylinkState
|
|
- Source:
-
Fires: